/* Учебный центр EMILINK — светлая тема, адаптив, анимации */

:root {
    --bg: #f4faf7;
    --bg-soft: #e4f4ea;
    --surface: #ffffff;
    --text: #14241c;
    --muted: #4a6356;
    --accent: #1a7a4a;
    --accent-soft: rgba(26, 122, 74, 0.14);
    --accent-2: #2faa7a;
    --header-bg: #134e3a;
    --header-border: rgba(255, 255, 255, 0.12);
    --on-header: rgba(255, 255, 255, 0.92);
    --border: rgba(19, 78, 58, 0.1);
    --shadow: 0 18px 50px rgba(19, 68, 48, 0.08);
    --radius: 18px;
    --radius-sm: 12px;
    --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --container: 1120px;
    --header-h: 76px;
}

html.a11y-mode {
    --bg: #ffffff;
    --text: #0a0a0a;
    --muted: #1a1a1a;
    --accent: #0d5c2e;
    font-size: 112%;
}

html.a11y-mode .hero__bg {
    filter: none;
    background-image: none;
    background: #fff;
}

html.a11y-mode a {
    text-decoration: underline;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration-thickness: 0.08em;
}

a:hover {
    color: #146b3f;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    background: var(--surface);
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.skip-link:focus {
    left: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 10px 32px rgba(0, 40, 25, 0.18);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo__img {
    display: block;
    height: 44px;
    width: auto;
    max-width: min(220px, 58vw);
    object-fit: contain;
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo__name {
    font-weight: 700;
    font-size: 1.05rem;
}

.logo__sub {
    font-size: 0.8rem;
    color: var(--muted);
}

.main-nav {
    margin-left: auto;
}

.site-header .nav-list a {
    color: var(--on-header);
    text-decoration: none;
}

.site-header .nav-list a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.site-header .btn--primary {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    box-shadow: none;
}

.site-header .btn--primary:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
}

.nav-list a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
    padding: 8px 6px;
    border-radius: 10px;
}

.nav-list a:hover {
    background: var(--accent-soft);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.nav-toggle__bar {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.header__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.a11y-btn {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
}

.a11y-btn[aria-pressed="true"] {
    border-color: rgba(200, 245, 214, 0.85);
    background: rgba(255, 255, 255, 0.2);
}

/* Полноширинный баннер под шапкой (главная страница) */
.main-banner {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0f3d2c 0%, #134e3a 40%, #1a7a4a 100%);
    line-height: 0;
}

.main-banner__img {
    display: block;
    width: 100%;
    height: clamp(200px, min(42vw, 52vh), 580px);
    object-fit: cover;
    object-position: center;
}

.main-banner__placeholder {
    display: block;
    width: 100%;
    height: clamp(180px, min(36vw, 40vh), 420px);
    background:
        linear-gradient(125deg, rgba(15, 61, 44, 0.95) 0%, rgba(26, 122, 74, 0.65) 50%, rgba(228, 244, 234, 0.35) 100%),
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(47, 170, 122, 0.25), transparent 70%);
}

@media (max-width: 780px) {
    .main-banner__img {
        height: clamp(160px, 42vw, 320px);
    }

    .main-banner__placeholder {
        height: clamp(140px, 36vw, 260px);
    }
}

/* Баннеры между секциями (направления, процесс) */
.section-banner {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(115deg, #e8f6ee 0%, #d4efe0 45%, #c5e8d6 100%);
    line-height: 0;
}

.section-banner__img {
    display: block;
    width: 100%;
    height: clamp(140px, min(28vw, 38vh), 420px);
    object-fit: cover;
    object-position: center;
}

.section-banner__placeholder {
    display: block;
    width: 100%;
    height: clamp(120px, min(24vw, 32vh), 340px);
    background:
        linear-gradient(130deg, rgba(15, 61, 44, 0.12) 0%, rgba(26, 122, 74, 0.18) 55%, rgba(228, 244, 234, 0.6) 100%),
        radial-gradient(ellipse 70% 55% at 75% 35%, rgba(47, 170, 122, 0.2), transparent 72%);
}

@media (max-width: 780px) {
    .section-banner__img {
        height: clamp(100px, 30vw, 240px);
    }

    .section-banner__placeholder {
        height: clamp(88px, 26vw, 200px);
    }
}

.hero {
    position: relative;
    padding: 48px 0 72px;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 420px at 12% 22%, rgba(47, 170, 122, 0.28), transparent 60%),
        radial-gradient(700px 500px at 82% 8%, rgba(19, 142, 102, 0.2), transparent 55%),
        linear-gradient(180deg, #e8f6ee 0%, #f4faf7 55%, #dff0e8 100%);
}

.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1800&q=70");
    background-size: cover;
    background-position: center;
    opacity: 0.14;
    mix-blend-mode: multiply;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero__title {
    font-size: clamp(2rem, 2.8vw + 1rem, 3.1rem);
    line-height: 1.08;
    margin: 0 0 16px;
    letter-spacing: -0.03em;
}

.hero__lead {
    font-size: 1.08rem;
    color: var(--muted);
    margin: 0 0 22px;
    max-width: 52ch;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #1e3d2a;
    font-weight: 700;
    font-size: 0.82rem;
    margin: 0 0 14px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.hero__meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.hero__meta dd {
    margin: 4px 0 0;
    font-weight: 600;
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 20px;
}

.hero-card__cap {
    margin: 14px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
}

.hero__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: var(--bg-soft);
    line-height: 0;
}

.hero__wave svg {
    width: 100%;
    height: 64px;
    display: block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent), #2a9d62);
    color: #fff;
    box-shadow: 0 14px 30px rgba(26, 122, 74, 0.28);
}

.btn--primary:hover {
    color: #fff;
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--border);
    color: var(--text);
}

.btn--sm {
    padding: 8px 14px;
    font-size: 0.9rem;
}

.section {
    padding: 72px 0;
}

.section--soft {
    background: var(--bg-soft);
}

.section--accent {
    background: radial-gradient(900px 500px at 10% 20%, rgba(26, 122, 74, 0.12), transparent 55%),
        radial-gradient(800px 400px at 90% 10%, rgba(47, 170, 122, 0.14), transparent 50%),
        #ecf7f0;
}

.section__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 42px;
}

.section__title {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 1.3vw + 1rem, 2.2rem);
    letter-spacing: -0.02em;
}

.section__sub {
    margin: 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 22px;
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.align-center {
    align-items: center;
}

.card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(19, 68, 48, 0.05);
}

.card--lift {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card--lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.card__icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.card__title {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.card__text {
    margin: 0 0 14px;
    color: var(--muted);
}

.card__link {
    font-weight: 700;
    text-decoration: none;
}

.panel {
    padding: 24px;
    border-radius: var(--radius);
}

.panel--glass {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.panel--outline {
    border: 1px dashed rgba(26, 122, 74, 0.35);
    background: rgba(255, 255, 255, 0.75);
}

.panel__title {
    margin-top: 0;
}

.check-list {
    padding-left: 20px;
    color: var(--muted);
}

.check-list li {
    margin-bottom: 10px;
}

.react-root {
    min-height: 120px;
}

.react-root--wide {
    min-height: 280px;
}

.doc-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.doc-pill {
    padding: 12px 16px;
    border-radius: 999px;
    font-weight: 700;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 8px 22px rgba(19, 68, 48, 0.06);
}

.doc-pill:hover {
    border-color: rgba(26, 122, 74, 0.35);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    margin-bottom: 10px;
}

.contact-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.field__label {
    font-weight: 600;
    font-size: 0.92rem;
}

.input {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface);
}

.input:focus {
    outline: 2px solid rgba(26, 122, 74, 0.32);
    border-color: rgba(26, 122, 74, 0.45);
}

.input--area {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 12px;
}

.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin: 0 0 14px;
    font-weight: 600;
}

.alert--success {
    background: #e6fcf5;
    border: 1px solid #8ce99a;
    color: #0b5c2e;
}

.alert--error {
    background: #fff5f5;
    border: 1px solid #ffa8a8;
    color: #862e2e;
}

.site-footer {
    padding: 48px 0 0;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff, #eaf6ef);
}

.footer-brand__title {
    margin: 0 0 6px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
}

.footer-brand__sub {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 28px;
    padding-bottom: 32px;
}

.footer__title {
    margin: 0 0 12px;
    font-size: 1rem;
}

.footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__links li {
    margin-bottom: 8px;
}

.footer__links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
}

.footer__note {
    color: var(--muted);
    max-width: 46ch;
}

.footer__bottom {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sveden-main {
    padding: 36px 0 64px;
}

.sveden-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

.sveden-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.sveden-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 12px 28px rgba(19, 68, 48, 0.05);
}

.sveden-nav__title {
    font-weight: 800;
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.sveden-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sveden-nav__link {
    display: block;
    padding: 9px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
}

.sveden-nav__link:hover {
    background: var(--accent-soft);
}

.sveden-nav__link.is-active {
    background: rgba(26, 122, 74, 0.15);
    border: 1px solid rgba(26, 122, 74, 0.22);
}

.sveden-article {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px 28px 36px;
    box-shadow: 0 16px 40px rgba(19, 68, 48, 0.05);
}

.breadcrumb {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.breadcrumb a {
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb__current {
    color: var(--text);
    font-weight: 700;
}

.sveden-title {
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

.prose h2 {
    margin-top: 28px;
}

.lead {
    font-size: 1.1rem;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.sveden-block {
    margin-top: 26px;
}

.callout {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
}

.callout--info {
    border-color: rgba(26, 122, 74, 0.28);
    background: rgba(26, 122, 74, 0.08);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.link-grid a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    text-decoration: none;
    font-weight: 700;
    color: var(--text);
}

.link-grid a:hover {
    background: var(--accent-soft);
}

.detail-list {
    padding-left: 18px;
}

.numbered {
    padding-left: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    vertical-align: top;
}

.data-table th {
    background: var(--bg-soft);
    text-align: left;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px dashed rgba(26, 122, 74, 0.32);
}

.org-chart__level {
    width: 100%;
    display: flex;
    justify-content: center;
}

.org-chart__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.org-box {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
}

.org-box--root {
    background: linear-gradient(135deg, rgba(26, 122, 74, 0.14), rgba(47, 170, 122, 0.18));
    border-color: rgba(26, 122, 74, 0.28);
}

.org-chart__connect {
    width: 2px;
    height: 18px;
    background: rgba(26, 122, 74, 0.38);
}

[data-animate] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible {
    opacity: 1;
    transform: none;
}

[data-animate="fade-left"] {
    transform: translateX(-18px);
}

[data-animate="fade-left"].is-visible {
    transform: none;
}

.ig-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ig-stat {
    padding: 12px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.ig-stat strong {
    display: block;
    font-size: 1.5rem;
    font-family: var(--mono);
}

.ig-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ig-tab {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
}

.ig-tab.is-active {
    border-color: rgba(26, 122, 74, 0.45);
    background: rgba(26, 122, 74, 0.1);
}

.ig-panel {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
}

.ig-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ig-step {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: start;
}

.ig-step-num {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

@media (max-width: 1024px) {
    .hero__inner {
        grid-template-columns: 1fr;
    }
    .hero__meta {
        grid-template-columns: 1fr;
    }
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
    .grid--3 {
        grid-template-columns: 1fr 1fr;
    }
    .sveden-layout {
        grid-template-columns: 1fr;
    }
    .sveden-sidebar {
        position: static;
    }
    .org-chart__row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        order: 3;
        width: 100%;
        left: 16px;
        right: 16px;
        top: calc(var(--header-h) - 6px);
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 12px;
        box-shadow: var(--shadow);
        display: none;
    }

    .main-nav.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
    }

    .header__inner {
        flex-wrap: wrap;
    }

    .grid--2,
    .grid--3 {
        grid-template-columns: 1fr;
    }
    .footer__grid {
        grid-template-columns: 1fr;
    }
    .link-grid {
        grid-template-columns: 1fr;
    }
}
