/* =========================================================
   PUBLIC LANDING — CLEAN EDITORIAL PASS
   Darya Loskutova / social studies EGE
   Goal: keep the strong first-screen identity, remove "AI UI" noise.
========================================================= */

.landing {
    --blue: #1746a2;
    --blue-deep: #0f347f;
    --wine: #8d2536;
    --wine-deep: #6f1929;
    --cream: #fffdf8;
    --ink: #152440;
    --text: #35415a;
    --muted: #667085;
    --line: #d8dee8;
    --blue-light: #edf3ff;

    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--cream);
    color: var(--ink);
    font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

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

.landing img {
    max-width: 100%;
}

.landing a,
.landing button {
    color: inherit;
    font: inherit;
}

.landing a {
    text-decoration: none;
}

.landing button {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   HEADER
========================================================= */

.landing-header {
    position: sticky;
    z-index: 80;
    top: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 78px;
    margin: 0;
    padding-inline: max(24px, calc((100% - 1240px) / 2));
    border-bottom: 1px solid rgba(23, 70, 162, 0.12);
    background: var(--cream);
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    min-width: 150px;
    font-weight: 700;
}

.landing-brand-copy {
    display: grid;
    gap: 0;
}

.landing-brand-copy strong {
    font-size: 16px;
    letter-spacing: -0.02em;
}

.landing-brand-copy small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.landing-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(18px, 2.2vw, 32px);
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
}

.landing-navigation a {
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
}

.landing-navigation a::after {
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;
    height: 1px;
    background: var(--wine);
    content: "";
    opacity: 0;
    transform: scaleX(.55);
    transition: opacity .16s ease, transform .16s ease;
}

.landing-navigation a:hover::after,
.landing-navigation a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.landing .landing-navigation-cabinet {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 16px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: background .16s ease, border-color .16s ease;
}

.landing .landing-navigation-cabinet:hover {
    border-color: var(--blue-deep);
    background: var(--blue-deep);
}

.landing-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
}

.landing-menu-button > span:not(.sr-only) {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
}

/* =========================================================
   BUTTONS
========================================================= */

.landing-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 21px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    background: var(--blue);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.landing-button:hover {
    border-color: var(--blue-deep);
    background: var(--blue-deep);
    transform: translateY(-1px);
}

.landing-button--secondary {
    border-color: #b8c5db;
    background: transparent;
    color: var(--blue) !important;
}

.landing-button--secondary:hover {
    border-color: var(--blue);
    background: var(--blue-light);
}

.landing-button--cream {
    border-color: var(--cream);
    background: var(--cream);
    color: var(--blue-deep) !important;
}

.landing-button--cream:hover {
    border-color: #fff;
    background: #fff;
}

/* =========================================================
   SHARED
========================================================= */

.landing-content-section {
    position: relative;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 96px 0;
}

.landing :where(a, button):focus-visible {
    outline: 3px solid rgba(141, 37, 54, .42);
    outline-offset: 3px;
}

.landing-kicker {
    margin: 0 0 13px;
    color: var(--wine);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.landing-kicker--light {
    color: rgba(255,255,255,.72);
}

.landing-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    align-items: end;
    gap: 64px;
    margin-bottom: 48px;
}

.landing-section-heading h2 {
    max-width: 760px;
    margin: 0;
    color: var(--ink);
    font-family: "Onest", sans-serif;
    font-size: clamp(38px, 4.6vw, 56px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.landing-section-heading > p,
.landing-section-heading > div > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
}

/* =========================================================
   HERO — keep the successful composition
========================================================= */

.landing-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, .92fr);
    align-items: center;
    gap: 35px;
    width: min(1240px, calc(100% - 48px));
    min-height: 690px;
    margin: 0 auto;
    padding: 52px 0 84px;
    overflow: visible;
}

.landing-hero-copy {
    position: relative;
    z-index: 5;
    max-width: 660px;
}

.landing-hero h1 {
    margin: 0 0 25px;
    color: var(--ink);
    font-family: "Onest", sans-serif;
    font-size: clamp(50px, 5.4vw, 73px);
    font-weight: 750;
    letter-spacing: -.06em;
    line-height: .99;
}

.landing-hero h1 span {
    position: relative;
    display: inline-block;
    color: var(--blue);
}

.landing-hero h1 span::after {
    position: absolute;
    right: 4px;
    bottom: -7px;
    left: 2px;
    height: 3px;
    background: var(--wine);
    content: "";
    transform: rotate(-1deg);
}

.landing-lead {
    max-width: 580px;
    margin: 0 0 29px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-hand-note {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    transform: rotate(-1deg);
}

.teacher-hand-note svg {
    width: 75px;
    height: 24px;
    fill: none;
    stroke: var(--wine);
    stroke-width: 1.4;
}

.landing-hero-visual {
    position: relative;
    min-height: 560px;
}

.hero-shape {
    position: absolute;
    display: block;
}

.hero-shape--blue {
    top: 43px;
    right: 0;
    width: 410px;
    height: 430px;
    border-radius: 47% 53% 30% 70% / 34% 34% 66% 66%;
    background: #e3eafb;
    transform: rotate(4deg);
}

.hero-shape--wine {
    top: 27px;
    right: 72px;
    width: 190px;
    height: 155px;
    border-radius: 55% 45% 60% 40%;
    background: #ead4d9;
    transform: rotate(-11deg);
}

.hero-photo-wrap {
    position: absolute;
    z-index: 3;
    top: 60px;
    right: 26px;
    width: 300px;
    height: 400px;
    overflow: hidden;
    border-radius: 46% 46% 18% 18% / 31% 31% 12% 12%;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-book {
    position: absolute;
    z-index: 7;
    object-fit: contain;
    filter: drop-shadow(0 17px 17px rgba(22, 35, 63, .17));
}

.hero-book--green { left: 0; bottom: 10px; width: 175px; transform: rotate(-8deg); }
.hero-book--ege { left: 120px; bottom: -2px; width: 200px; transform: rotate(1deg); }
.hero-book--constitution { right: -8px; bottom: 5px; width: 170px; transform: rotate(7deg); }

.hero-paper-note {
    position: absolute;
    z-index: 9;
    top: 53px;
    right: -16px;
    width: 150px;
    padding: 16px;
    border: 1px solid #e7d8d4;
    background: #fffaf2;
    box-shadow: 5px 6px 14px rgba(60, 42, 47, .08);
    color: var(--ink);
    transform: rotate(4deg);
}

.hero-paper-note span,
.hero-paper-note strong,
.hero-paper-note small { display: block; }
.hero-paper-note span { color: var(--muted); font-size: 12px; }
.hero-paper-note strong { margin-top: 3px; color: var(--wine); font-size: 14px; }
.hero-paper-note small { margin-top: 2px; font-size: 12px; }
.hero-paper-note svg { width: 80px; height: 22px; margin-top: 5px; fill: none; stroke: var(--blue); stroke-width: 1.5; }

.hero-answer-card {
    position: absolute;
    z-index: 6;
    left: 22px;
    top: 60px;
    width: 120px;
    padding: 13px;
    border: 1px solid #c9d2e2;
    background: rgba(255,255,255,.96);
    box-shadow: 5px 6px 0 rgba(23,70,162,.07);
    transform: rotate(-4deg);
}

.hero-answer-card strong { display: block; margin-bottom: 11px; color: var(--blue); font-size: 12px; letter-spacing: .05em; }
.hero-answer-card span { display: inline-block; width: 22px; color: var(--muted); font-size: 12px; font-weight: 700; }
.hero-answer-card i { display: inline-block; width: 60px; height: 9px; margin-bottom: 4px; border-bottom: 1px solid #bdc5d2; }

/* =========================================================
   ABOUT — keep the strong band, remove extra wave
========================================================= */

.landing-about {
    position: relative;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr) 190px;
    align-items: center;
    gap: 55px;
    width: 100%;
    min-height: 500px;
    padding: 80px max(45px, calc((100vw - 1180px) / 2));
    overflow: hidden;
    background: var(--blue);
    color: #fff;
}

.landing-about-photo { position: relative; z-index: 3; }
.about-photo-paper { width: 250px; padding: 9px 9px 34px; border: 1px solid rgba(255,255,255,.55); background: var(--cream); box-shadow: 10px 12px 0 rgba(11, 37, 90, .20); }
.about-photo-paper img { display: block; width: 100%; height: 300px; object-fit: cover; object-position: center top; }
.about-photo-heart {
    position: absolute;
    z-index: 5;
    right: -48px;
    bottom: 18px;
    width: 82px;
    height: auto;
    overflow: visible;
    fill: none;
    stroke: #ee6678;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.7;
    filter: drop-shadow(0 2px 0 rgba(11, 37, 90, .2));
    transform: rotate(7deg);
}

.landing-about-copy { position: relative; z-index: 4; }
.landing-about-copy h2 { margin: 0 0 21px; color: white; font-size: clamp(37px, 4.5vw, 55px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
.landing-about-copy > p { max-width: 620px; margin: 0 0 14px; color: rgba(255,255,255,.82); font-size: 16px; line-height: 1.65; }
.landing-about-copy .about-name { color: white; font-weight: 700; }

.landing-about-facts { position: relative; z-index: 3; display: grid; gap: 12px; }
.landing-about-facts > div { padding: 14px 0 14px 15px; border-left: 1px solid rgba(255,255,255,.28); }
.landing-about-facts strong,
.landing-about-facts span,
.landing-about-facts small { display: block; }
.landing-about-facts strong { color: white; font-size: 28px; letter-spacing: -.035em; }
.landing-about-facts span { color: #d7e2ff; font-size: 13px; font-weight: 600; }
.landing-about-facts small { margin-top: 4px; color: rgba(255,255,255,.75); font-size: 13px; line-height: 1.45; }

/* =========================================================
   PLATFORM — screenshot first, no floating cards
========================================================= */

.landing-platform { padding-top: 108px; padding-bottom: 118px; }
.platform-showcase { position: relative; min-height: 0; margin-top: 4px; }

.landing-platform-shot {
    position: relative;
    left: auto;
    top: auto;
    width: min(980px, 100%);
    margin: 0 auto;
    transform: none;
}

.landing-platform-shot::before,
.landing-platform-shot::after { display: none; }

.landing-platform-shot button {
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: white;
    box-shadow: 0 16px 36px rgba(25,44,85,.08);
}

.landing-platform-shot img { display: block; width: 100%; border-radius: 2px; }

/* =========================================================
   PROCESS — editorial sequence, no cards, no wave
========================================================= */

.landing-process {
    position: relative;
    padding: 92px max(45px, calc((100vw - 1180px) / 2)) 100px;
    background: var(--wine-deep);
    color: white;
}

.landing-section-heading--light h2 { color: white; }
.landing-section-heading--light > p { color: rgba(255,255,255,.74); }

.landing-route {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 54px 0 0;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,.42);
    border-bottom: 1px solid rgba(255,255,255,.20);
    list-style: none;
}

.landing-route li {
    min-height: 220px;
    padding: 24px 22px 28px 0;
    border-right: 1px solid rgba(255,255,255,.18);
}

.landing-route li + li { padding-left: 22px; }
.landing-route li:last-child { border-right: 0; }

.route-number {
    display: block;
    margin-bottom: 34px;
    color: rgba(255,255,255,.55);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .05em;
}

.landing-route h3 {
    margin: 0 0 9px;
    color: white;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.3;
}

.landing-route p {
    max-width: 190px;
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 14px;
    line-height: 1.55;
}

/* =========================================================
   MATERIALS — real examples, no scrapbook frame
========================================================= */

.landing-materials { padding-top: 112px; padding-bottom: 118px; }

.material-desk {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-top: 8px;
}

.material-desk::before { display: none; }

.material-paper {
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    background: white;
    box-shadow: none;
    transform: none;
}

.material-paper img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.material-paper figcaption {
    padding: 14px 16px 15px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

/* =========================================================
   FORMATS — price list, not SaaS cards
========================================================= */

.landing-formats { padding-top: 110px; padding-bottom: 120px; }
.formats-list { border-top: 1px solid var(--ink); }

.format-row {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(210px, .65fr) minmax(280px, 1.1fr);
    align-items: center;
    gap: 34px;
    min-height: 132px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.format-name {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: baseline;
    gap: 14px;
}

.format-name span { color: var(--wine); font-size: 13px; font-weight: 700; }
.format-name h3 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }

.format-price { display: grid; gap: 2px; }
.format-price strong { color: var(--blue); font-size: 27px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.format-price small { color: var(--muted); font-size: 13px; }

.format-row > p { max-width: 480px; margin: 0; color: var(--text); font-size: 15px; line-height: 1.6; }

/* =========================================================
   DOCUMENTS — simple evidence grid
========================================================= */

.landing-documents { padding-top: 108px; padding-bottom: 120px; }

.documents-desk {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    min-height: 0;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
}

.documents-desk::before { display: none; }

.document-paper {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    height: 390px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: white;
    box-shadow: none;
    transition: border-color .16s ease, transform .16s ease;
}

.document-paper:hover { border-color: #aab6c8; transform: translateY(-2px); }
.document-paper img { display: block; width: 100%; height: 100%; border-radius: 0; background: #f7f9fc; object-fit: contain; }
.document-paper > span { display: grid; min-height: 44px; place-items: center; padding: 11px 6px 3px; color: var(--text); font-size: 13px; font-weight: 600; text-align: center; }

/* =========================================================
   REVIEWS — screenshots on a simple editorial board
========================================================= */

.landing-reviews { padding-top: 108px; padding-bottom: 120px; }

.reviews-more-link {
    align-self: end;
    justify-self: end;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--wine);
    color: var(--wine) !important;
    font-size: 14px;
    font-weight: 700;
}

.reviews-board {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-rows: repeat(2, 188px);
    gap: 20px;
    padding: 25px;
    border: 1px solid #c5cfde;
    background:
        linear-gradient(rgba(255,255,255,.86), rgba(255,255,255,.86)),
        repeating-linear-gradient(0deg, transparent 0 31px, #dbe3ef 31px 32px),
        var(--cream);
}

.review-paper {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #aeb9ca;
    border-radius: 2px;
    background: #fff;
    box-shadow: 6px 7px 0 rgba(23, 70, 162, .1);
    transform: rotate(.35deg);
    transition: border-color .16s ease, transform .16s ease;
}

.review-paper--large { grid-row: 1 / span 2; transform: rotate(-.45deg); }
.review-paper:nth-child(3) { transform: rotate(-.25deg); }
.review-paper:hover { border-color: var(--blue); transform: translateY(-2px) rotate(0); }
.review-paper img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* =========================================================
   DIAGNOSTICS — keep one strong closing band
========================================================= */

.landing-diagnostics {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 80px;
    padding: 86px max(45px, calc((100vw - 1180px) / 2));
    overflow: hidden;
    background: var(--blue-deep);
    color: white;
}

.landing-diagnostics h2 { max-width: 700px; margin: 0 0 22px; color: white; font-size: clamp(39px, 5vw, 59px); font-weight: 700; letter-spacing: -.05em; line-height: 1.03; }
.landing-diagnostics-copy > p:not(.landing-kicker) { max-width: 630px; margin: 0 0 10px; color: rgba(255,255,255,.77); font-size: 16px; line-height: 1.65; }
.landing-diagnostics .landing-actions { margin-top: 27px; }
.diagnostics-link { display: inline-flex; min-height: 48px; align-items: center; padding: 0 10px; color: #d8e4ff !important; font-size: 14px; font-weight: 600; }

.diagnostics-visual { position: relative; min-height: 315px; }
.diagnostics-visual img { position: absolute; z-index: 3; right: 10px; bottom: -70px; width: 285px; }

/* =========================================================
   FOOTER
========================================================= */

.landing-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 42px;
    border-top: 1px solid var(--line);
}

.landing-footer > div { display: grid; gap: 3px; }
.landing-footer strong { color: var(--ink); font-size: 15px; }
.landing-footer > div span { color: var(--muted); font-size: 14px; }
.landing-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.landing-footer nav a,
.landing-footer nav button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }

/* =========================================================
   LIGHTBOX
========================================================= */

.landing-lightbox[hidden] { display: none; }
.landing-lightbox { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; padding: 40px; background: rgba(8,19,44,.88); }
.landing-lightbox img { max-width: min(850px, 90vw); max-height: 82vh; object-fit: contain; box-shadow: 0 25px 80px rgba(0,0,0,.35); }
.landing-lightbox p { position: absolute; bottom: 14px; color: white; font-size: 13px; }
.landing-lightbox-close { position: absolute; top: 22px; right: 28px; width: 46px; height: 46px; border: 0; border-radius: 4px; background: white; color: var(--ink); font-size: 26px; }

/* =========================================================
   REVEAL
========================================================= */

.reveal-on-scroll { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.landing-platform-shot.reveal-on-scroll { transform: translateY(14px); }
.landing-platform-shot.reveal-on-scroll.is-visible { transform: translateY(0); }

/* =========================================================
   RESPONSIVE — switch header early; never let nav overlap
========================================================= */

@media (max-width: 1120px) {
    .landing-header {
        grid-template-columns: 1fr auto;
        width: 100%;
        padding-inline: 20px;
        column-gap: 8px;
    }

    .landing-menu-button { display: block; }

    .landing-navigation {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        padding: 10px 0 14px;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        background: var(--cream);
        box-shadow: 0 12px 25px rgba(25,44,85,.08);
    }

    .landing-navigation.is-open,
    .landing-navigation[data-open="true"] {
        display: grid;
        gap: 0;
    }

    .landing-navigation a,
    .landing-navigation .landing-navigation-cabinet {
        display: block;
        width: 100%;
        padding: 12px 18px;
        border: 0;
        background: transparent;
        color: var(--ink);
        font-size: 14px;
        text-align: left;
    }

    .landing-navigation .landing-navigation-cabinet { margin-left: 0; }

    .landing-navigation a::after { display: none; }

    .landing-hero {
        grid-template-columns: minmax(0, 1fr) 390px;
    }

    .landing-hero-visual {
        transform: scale(.9);
        transform-origin: center right;
    }

    .landing-about {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .landing-about-facts {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .landing-about-facts > div {
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.25);
    }

    .landing-route {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .landing-route li:nth-child(3) { border-right: 0; }
    .landing-route li:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.18); }

    .format-row {
        grid-template-columns: minmax(200px, .8fr) minmax(190px, .65fr) minmax(260px, 1fr);
        gap: 24px;
    }
}

@media (max-width: 850px) {
    .landing-section-heading { grid-template-columns: 1fr; gap: 16px; }

    .landing-hero {
        grid-template-columns: 1fr;
        padding-top: 62px;
    }

    .landing-hero-copy { max-width: 700px; }
    .landing-hero-visual { width: min(520px, 100%); min-height: 510px; margin: 0 auto; transform: none; }

    .landing-about { grid-template-columns: 240px minmax(0, 1fr); gap: 35px; }

    .landing-route { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .landing-route li,
    .landing-route li:nth-child(3) { border-right: 1px solid rgba(255,255,255,.18); }
    .landing-route li:nth-child(2n) { border-right: 0; }
    .landing-route li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.18); }

    .format-row {
        grid-template-columns: minmax(200px, .9fr) minmax(180px, .6fr);
        gap: 12px 24px;
    }

    .format-row > p { grid-column: 1 / -1; }

    .landing-diagnostics { grid-template-columns: minmax(0, 1fr) 250px; gap: 35px; }
}

@media (max-width: 640px) {
    .landing-header {
        width: 100%;
        padding-inline: 14px;
        min-height: 68px;
    }

    .landing-brand { min-width: 0; }
    .landing-brand-copy small { display: none; }
    .landing-content-section { width: calc(100% - 32px); padding: 74px 0; }
    .landing-section-heading { margin-bottom: 34px; }
    .landing-section-heading h2 { font-size: 36px; }
    .landing-section-heading > p,
    .landing-section-heading > div > p:last-child { font-size: 15px; }

    .landing-hero { width: calc(100% - 32px); min-height: auto; padding: 50px 0 58px; }
    .landing-hero h1 { font-size: 44px; }
    .landing-lead { font-size: 16px; }
    .landing-actions { align-items: stretch; flex-direction: column; }
    .landing-actions .landing-button { width: 100%; }
    .teacher-hand-note { font-size: 12px; }

    .landing-hero-visual { min-height: 430px; margin-top: 24px; margin-bottom: -55px; transform: scale(.84); transform-origin: top center; }
    .hero-photo-wrap { right: 8%; width: 250px; height: 340px; }
    .hero-shape--blue { right: 3%; width: 340px; height: 360px; }
    .hero-book--green { width: 130px; }
    .hero-book--ege { left: 87px; width: 160px; }
    .hero-book--constitution { width: 140px; }
    .hero-paper-note { right: 0; width: 125px; }
    .hero-answer-card { left: 0; top: 25px; }

    .landing-about { grid-template-columns: 1fr; padding: 68px 24px; }
    .landing-about-photo { width: min(280px, 100%); margin: 0 auto; }
    .about-photo-paper { width: 100%; }
    .landing-about-copy > p { font-size: 15px; }
    .landing-about-facts { grid-template-columns: 1fr; gap: 4px; }
    .landing-about-facts > div { display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; }
    .landing-about-facts span,
    .landing-about-facts small { grid-column: 2; }

    .landing-platform { padding-top: 76px; padding-bottom: 78px; }
    .landing-platform-shot button { padding: 4px; }

    .landing-process { padding: 72px 22px; }
    .landing-route { grid-template-columns: 1fr; margin-top: 34px; border-bottom: 0; }
    .landing-route li,
    .landing-route li:nth-child(3),
    .landing-route li:nth-child(n+4) {
        display: grid;
        grid-template-columns: 44px minmax(0,1fr);
        min-height: 0;
        padding: 19px 0;
        border-right: 0;
        border-top: 0;
        border-bottom: 1px solid rgba(255,255,255,.18);
    }
    .landing-route li + li { padding-left: 0; }
    .route-number { grid-row: 1 / 3; margin: 2px 0 0; }
    .landing-route h3 { margin: 0; font-size: 17px; }
    .landing-route p { max-width: none; margin-top: 5px; font-size: 14px; }

    .material-desk { grid-template-columns: 1fr; gap: 22px; }

    .format-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 22px 0 24px;
    }
    .format-row > p { grid-column: auto; }
    .format-name { grid-template-columns: 34px minmax(0,1fr); }
    .format-name h3 { font-size: 20px; }
    .format-price strong { font-size: 25px; }

    .documents-desk { grid-template-columns: 1fr; gap: 14px; }
    .document-paper { height: 330px; }

    .about-photo-heart { right: -20px; bottom: 14px; width: 72px; }

    .reviews-more-link { justify-self: start; }
    .reviews-board { grid-template-columns: 1fr; grid-template-rows: 290px 145px 145px; gap: 14px; padding: 16px; }
    .review-paper--large { grid-row: auto; }

    .landing-diagnostics { grid-template-columns: 1fr; padding: 70px 23px 0; }
    .landing-diagnostics-copy > p:not(.landing-kicker) { font-size: 15px; }
    .diagnostics-visual { width: 300px; max-width: 100%; min-height: 320px; margin: 0 auto; }
    .diagnostics-visual img { right: 5px; }

    .landing-footer { align-items: flex-start; flex-direction: column; width: calc(100% - 32px); }
    .landing-footer nav { justify-content: flex-start; }
}

@media (max-width: 390px) {
    .landing-hero h1 { font-size: 40px; }
    .landing-hero-visual { margin-left: -15px; width: calc(100% + 30px); transform: scale(.76); transform-origin: top center; margin-bottom: -95px; }
    .landing-about-copy h2 { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
    .landing *,
    .landing *::before,
    .landing *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Click-to-enlarge previews */
.landing .preview-zoom-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.landing .preview-zoom-button::after {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border: 1px solid rgba(21, 36, 64, .18);
    background: rgba(255, 253, 248, .94);
    color: var(--ink);
    content: "Увеличить ↗";
    font-size: 12px;
    font-weight: 650;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
}

.landing .preview-zoom-button:hover::after,
.landing .preview-zoom-button:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.landing .material-paper .preview-zoom-button img,
.landing .landing-platform-shot .preview-zoom-button img {
    transition: transform .18s ease;
}

.landing .preview-zoom-button:hover img {
    transform: scale(1.01);
}

.landing .landing-lightbox img {
    max-width: min(1200px, 94vw);
    max-height: 88vh;
}

@media (max-width: 640px) {
    .landing .preview-zoom-button::after {
        right: 8px;
        bottom: 8px;
        padding: 6px 8px;
        font-size: 12px;
        opacity: 1;
        transform: none;
    }
}
