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

:root {
    --bg-deep: #041f26;
    --bg-soft: #f6f4ec;
    --ink-main: #172024;
    --ink-soft: #4f5961;
    --accent: #0b8f74;
    --accent-soft: #d7f4ec;
    --line: #d8dfda;
    --danger: #b23b38;
    --ease-out-smooth: cubic-bezier(0.2, 0.75, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--ink-main);
    background:
        radial-gradient(circle at 0 0, #9ad3c520 0%, transparent 42%),
        radial-gradient(circle at 100% 100%, #f6b24d24 0%, transparent 36%),
        var(--bg-soft);
}

body.is-loading {
    overflow: hidden;
}

.site-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, #0e4f5f 0%, transparent 38%),
        radial-gradient(circle at 80% 80%, #0d3f4f 0%, transparent 40%),
        linear-gradient(140deg, #04232b 0%, #0c3640 100%);
    transition: opacity 500ms ease, visibility 500ms ease;
}

.site-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.site-preloader-inner {
    position: relative;
    width: min(280px, 76vw);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
}

.site-preloader-orbit {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 2px solid #8ad4c58f;
    border-top-color: #f5fffca3;
    animation: preloader-orbit 1.9s linear infinite;
}

.site-preloader-orbit::before,
.site-preloader-orbit::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.site-preloader-orbit::before {
    inset: 12%;
    border: 1px dashed #c7ece391;
    animation: preloader-orbit 3.2s linear infinite reverse;
}

.site-preloader-orbit::after {
    width: 14px;
    height: 14px;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    background: #d8fff6;
    box-shadow: 0 0 16px #d8fff6bf;
}

.site-preloader-logo-wrap {
    width: 58%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0b2f37ea;
    border: 1px solid #86ccb974;
    box-shadow: 0 16px 30px #0213187f;
}

.site-preloader-logo {
    width: 78%;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.38));
    animation: preloader-breathe 1500ms ease-in-out infinite;
}

.site-preloader-text {
    position: absolute;
    left: 50%;
    bottom: 2%;
    transform: translateX(-50%);
    color: #def6f0;
    font-size: 13px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-weight: 700;
}

@keyframes preloader-orbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes preloader-breathe {
    0%,
    100% {
        transform: scale(0.96);
        opacity: 0.88;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(8px);
    background: linear-gradient(95deg, #062932eb 0%, #10333aeb 100%);
    border-bottom: 1px solid #1f4e5766;
    box-shadow: 0 10px 24px #04252f2b;
}

.header-shell {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.brand {
    color: #ecf7f4;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-text {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    letter-spacing: 0.06em;
    --brand-cycle-duration: 3600ms;
}

.brand-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    animation: brand-char-in-loop var(--brand-cycle-duration) cubic-bezier(0.2, 0.75, 0.2, 1) infinite;
    animation-delay: calc(var(--char-index) * 55ms);
}

.brand-char-space {
    width: 0.45ch;
    animation: none;
    opacity: 1;
    transform: none;
}

@keyframes brand-char-in-loop {
    0%,
    8% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    16%,
    74% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    88%,
    100% {
        opacity: 0;
        transform: translateY(-8px) scale(1.03);
    }
}

.brand-logo {
    height: 86px;
    width: auto;
    display: block;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.28));
}

.home-page .brand-logo {
    height: 110px;
}

.menu-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav,
.lang-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.main-nav a,
.lang-nav a {
    color: #e9f6f2;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 999px;
    transition: all 170ms ease;
}

.main-nav a {
    border: 1px solid #2a5f674f;
    background: #0f3d4554;
}

.lang-nav {
    padding-left: 8px;
    border-left: 1px solid #2a5f6757;
}

.lang-nav a {
    border: 1px solid #2a5f6757;
    background: #0f3d4554;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.lang-nav a:hover,
.lang-nav a:focus-visible,
.lang-nav a.active {
    color: #072c2b;
    background: #d0efe7;
    border-color: #a8dacd;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid #2d5c64;
    border-radius: 10px;
    padding: 8px 10px;
    background: #0f3e46;
    color: #d7efe9;
    cursor: pointer;
}

.nav-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.nav-toggle-line {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #d7efe9;
    display: block;
}

.nav-toggle-label {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-header.is-open .nav-toggle {
    background: #d0efe7;
    border-color: #a8dacd;
    color: #0a3f39;
}

.site-header.is-open .nav-toggle-line {
    background: #0a3f39;
}

main.container {
    padding: 24px 0 36px;
}

.panel {
    background: #fffffff2;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 32px #16333a0c;
}

.reveal {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.985);
    transition:
        opacity 720ms var(--ease-out-smooth),
        transform 720ms var(--ease-out-smooth);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal[data-reveal="left"] {
    transform: translate3d(-28px, 0, 0);
}

.reveal[data-reveal="right"] {
    transform: translate3d(28px, 0, 0);
}

.reveal[data-reveal="zoom"] {
    transform: scale(0.93);
}

.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.hero {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.45rem, 3.1vw, 2rem);
}

.hero p {
    margin: 0;
    color: var(--ink-soft);
    max-width: 80ch;
}

.video-carousel-panel {
    margin-bottom: 16px;
}

.video-carousel {
    display: grid;
    gap: 14px;
}

.video-carousel-viewport {
    overflow: hidden;
    border-radius: 16px;
}

.video-carousel-track {
    display: flex;
    transform: translateX(0);
    transition: transform 320ms ease;
}

.video-slide {
    min-width: 100%;
    display: grid;
    gap: 14px;
    border: 1px solid #d8e5e1;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
    padding: 14px;
}

.video-slide-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d9e2de;
    background: #041f26;
    height: 420px;
}

.video-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.video-lite {
    position: relative;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 16px;
    color: #ffffff;
    cursor: pointer;
    overflow: hidden;
    background: #052127;
    text-align: left;
}

.video-lite-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: transform 480ms ease;
}

.video-slide.is-active .video-lite-bg {
    transform: scale(1);
}

.video-lite::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #00000030 0%, #001016c2 100%);
}

.video-lite-play,
.video-lite-label {
    position: relative;
    z-index: 1;
}

.video-lite-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #c6f6ea;
    background: #0c8c7388;
    box-shadow: 0 8px 18px #05161fb8;
    font-size: 26px;
    line-height: 1;
}

.video-lite-label {
    margin-top: 12px;
    display: inline-block;
    background: #d6f8f0;
    color: #0c5f4f;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 6px 10px;
}

.video-slide-media.is-loaded .video-lite {
    display: none;
}

.video-slide-media.is-loading .video-lite-play {
    animation: pulse-play 850ms ease-in-out infinite;
}

@keyframes pulse-play {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.video-slide-meta h2 {
    margin: 0 0 8px;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

.video-slide-meta p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.5;
}

.video-chip {
    display: inline-block;
    margin-bottom: 8px;
    background: #d9f4ec;
    color: #106e5c;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 6px 10px;
}

.video-carousel-controls {
    display: flex;
    gap: 10px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #b8cbc5;
    background: #ffffff;
    color: #0e534a;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    transition: all 160ms ease;
}

.carousel-btn:hover {
    background: #dff6ef;
    border-color: #9cbfb5;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: #bfd1cb;
    cursor: pointer;
    padding: 0;
}

.carousel-dot.is-active {
    background: #0b8f74;
}

.region-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.region-filter label {
    font-size: 14px;
    font-weight: 700;
}

.region-filter select,
.region-filter button {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    padding: 0 12px;
    font: inherit;
}

.region-filter button,
.donation-form button {
    border: 0;
    background: linear-gradient(120deg, #097b65 0%, #0e9f74 100%);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

#kg-map {
    width: 100%;
    height: 420px;
    border-radius: 14px;
    overflow: hidden;
}

.map-panel {
    position: relative;
}

.map-loading {
    position: absolute;
    inset: auto 20px 20px auto;
    background: #ffffffd1;
    border: 1px solid #dce5e1;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #30525b;
    pointer-events: none;
    transition: opacity 240ms ease;
}

.map-panel.is-loaded .map-loading {
    opacity: 0;
}

.project-list {
    margin-top: 18px;
}

.project-list h2 {
    margin: 0 0 10px;
    font-size: 1.32rem;
}

.project-card {
    margin-bottom: 16px;
}

.project-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
}

.project-head h3 {
    margin: 0;
}

.project-head p {
    margin: 2px 0 0;
    color: var(--ink-soft);
    font-weight: 700;
}

.project-description {
    color: #2f3941;
    line-height: 1.5;
}

.money-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 10px;
}

.money-stats p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 13px;
}

.money-stats strong {
    font-size: 1.1rem;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: #ebedeb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #087160 0%, #30b08d 100%);
}

.project-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.project-grid h4 {
    margin: 0 0 10px;
}

.document-list {
    margin: 0;
    padding-left: 18px;
}

.document-list a {
    color: #0c6a66;
    text-decoration: none;
}

.document-list a:hover {
    text-decoration: underline;
}

.donation-table-wrap {
    overflow-x: auto;
}

.donation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.donation-table th,
.donation-table td {
    border-bottom: 1px solid #e6ece8;
    padding: 8px 6px;
    text-align: left;
}

.donation-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5f6b71;
}

.donation-form {
    margin-top: 18px;
    border-top: 1px solid #e4e9e6;
    padding-top: 16px;
}

.donation-form h4 {
    margin: 0 0 4px;
}

.payment-note {
    margin: 0 0 10px;
    color: #415159;
    font-size: 13px;
}

.form-row {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.form-row label {
    font-size: 13px;
    font-weight: 700;
}

.form-row input {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #d6ded8;
    padding: 0 11px;
    font: inherit;
}

.donation-form button {
    min-height: 42px;
    border-radius: 10px;
    padding: 0 16px;
}

.empty-note {
    margin: 0;
    color: #59656a;
}

.flash-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.flash {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #cbddda;
    background: #f4fbf8;
    color: #113a36;
    font-weight: 600;
}

.flash-error {
    border-color: #ecc9c8;
    background: #fff1f1;
    color: var(--danger);
}

.page-hero {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3.4vw, 2.2rem);
}

.page-hero p {
    margin: 0;
    color: var(--ink-soft);
    max-width: 82ch;
}

.about-brand-logo {
    height: clamp(58px, 8vw, 92px);
    width: auto;
    display: block;
    margin-bottom: 4px;
}

.about-grid,
.contacts-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.clean-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.clean-list li {
    color: #2d3b42;
    line-height: 1.45;
}

.contact-items {
    display: grid;
    gap: 10px;
}

.contact-items p {
    margin: 0;
    color: #2a3940;
}

.contact-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d6ded8;
    padding: 10px 11px;
    font: inherit;
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    min-height: 42px;
    border-radius: 10px;
    padding: 0 16px;
    border: 0;
    background: linear-gradient(120deg, #097b65 0%, #0e9f74 100%);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.field-error {
    margin: 2px 0 0;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .header-shell {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 10px 0;
    }

    .brand {
        min-width: 0;
    }

    .brand-text {
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
        letter-spacing: 0.05em;
    }

    .brand-logo {
        height: 64px;
    }

    .home-page .brand-logo {
        height: 82px;
    }

    .nav-toggle {
        display: inline-flex;
        justify-content: center;
    }

    .menu-wrap {
        display: none;
        grid-column: 1 / -1;
        margin-left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        border: 1px solid #245862;
        border-radius: 14px;
        background: linear-gradient(180deg, #0f3c44 0%, #0b3139 100%);
        padding: 12px;
    }

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

    .main-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
    }

    .main-nav a {
        display: block;
        border-radius: 10px;
        padding: 10px 12px;
        text-align: left;
    }

    .lang-nav {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid #28606a;
        padding-top: 10px;
        justify-content: flex-start;
    }

    #kg-map {
        height: 320px;
    }

    .video-slide-media {
        height: 240px;
    }

    .video-lite-play {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .video-carousel-controls {
        justify-content: center;
    }

    .about-grid,
    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .money-stats {
        grid-template-columns: 1fr;
    }

    .site-preloader-inner {
        width: min(220px, 72vw);
    }

    .site-preloader-text {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-char {
        animation: none;
        opacity: 1;
        transform: none;
    }

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

    .video-lite-bg {
        transform: none;
        transition: none;
    }

    .video-slide-media.is-loading .video-lite-play {
        animation: none;
    }

    .site-preloader-orbit,
    .site-preloader-orbit::before,
    .site-preloader-logo {
        animation: none;
    }
}
