/* =========================================
   1. Переменные (Ночной режим по умолчанию + Дневной)
   ========================================= */
:root {
    --bg: #0b110d;
    --card: #131c16;
    --card-soft: #1a261e;
    --text: #eef3f0;
    --muted: #98aba0;
    --border: #26382c;
    --brand-grad: linear-gradient(to right, rgb(24, 65, 0) 0%, rgb(45, 0, 0) 100%);
    --accent: #ffd500;
    --accent-soft: rgba(255, 213, 0, 0.14);
    --btc: #f7931a;
    --btc-hover: #e07e08;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

body.day-mode {
    --bg: #f2f5f3;
    --card: #ffffff;
    --card-soft: #f7faf8;
    --text: #18231d;
    --muted: #5a6c62;
    --border: #dce4df;
    --brand-grad: linear-gradient(to right, #1b4d1a 0%, #4d1919 100%);
    --accent: #1b5e20;
    --accent-soft: rgba(27, 94, 32, 0.1);
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

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

html {
    height: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    transition: background 0.25s ease, color 0.25s ease;
}

/* =========================================
   2. Шапка и навигация
   ========================================= */
.site-header {
    background: var(--brand-grad);
    border-bottom: 1px solid #6b6d19;
    width: 100%;
    position: relative;
    z-index: 50;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-svg {
    height: 32px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-list a {
    color: #ffd500;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
    color: #ffffff;
}

.theme-toggle,
.menu-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 213, 0, 0.45);
    color: #ffd500;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-toggle {
    display: none;
    font-size: 20px;
}

/* =========================================
   3. Главный баннер с Bitcoin QR
   ========================================= */
.hero-banner {
    position: relative;
    background: #181015 url("../images/bg_header.jpg") center / cover no-repeat;
    padding: 46px 16px 52px;
    text-align: center;
    color: #ffffff;
    border-bottom: 1px solid #6b6d19;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 17, 13, 0.68) 0%, rgba(11, 17, 13, 0.86) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 213, 0, 0.14);
    border: 1px solid rgba(255, 213, 0, 0.4);
    color: #ffd500;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    margin-bottom: 14px;
}

.hero-content h1 {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: #ffffff;
}

.hero-sub {
    margin: 0 auto 28px;
    max-width: 600px;
    font-size: 16px;
    color: #dbe4df;
}

.btc-card {
    background: rgba(19, 28, 22, 0.92);
    border: 1px solid rgba(255, 213, 0, 0.35);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    text-align: left;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.qr-box {
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.qr-box img {
    display: block;
    width: 170px;
    height: 170px;
    max-width: 100%;
    object-fit: contain;
}

.wallet-info {
    flex: 1;
    min-width: 0;
}

.wallet-label {
    font-size: 13px;
    color: #98aba0;
    margin-bottom: 6px;
    font-weight: 600;
}

.wallet-address {
    background: #0b110d;
    border: 1px solid #2e4436;
    color: #ffd500;
    padding: 12px 14px;
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    word-break: break-all;
    user-select: all;
    margin-bottom: 14px;
}

.wallet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
    background: var(--btc);
    color: #111111;
}

.btn-primary:hover {
    background: var(--btc-hover);
}

.btn-sec {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-sec:hover {
    background: rgba(255, 255, 255, 0.18);
}

.wallet-note {
    font-size: 12.5px;
    color: #98aba0;
}

/* =========================================
   4. Основной контент
   ========================================= */
.main-wrap {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 26px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.gratitude-card {
    border-left: 4px solid var(--accent);
}

.gratitude-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
    color: var(--accent);
}

.gratitude-card p {
    margin: 0 0 14px;
    font-size: 15.5px;
    line-height: 1.68;
}

.gratitude-card .signature {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.gratitude-card .signature strong {
    color: var(--text);
}

.section-head {
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.section-head h2 {
    margin: 0;
    font-size: 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.project-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 10px;
    background: var(--card-soft);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.15s;
}

.project-tile:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.p-title {
    font-weight: 700;
    font-size: 15.5px;
    color: var(--accent);
}

.p-desc {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.45;
}

/* =========================================
   5. Футер
   ========================================= */
.site-footer {
    background: var(--brand-grad);
    border-top: 1px solid #6b6d19;
    padding: 18px 20px;
    font-size: 14px;
    color: #e2e8e4;
    margin-top: auto;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer a {
    color: #ffd500;
    text-decoration: none;
    margin: 0 4px;
}

.site-footer a:hover {
    color: #ffffff;
}

/* =========================================
   6. Адаптив: смартфоны и планшеты (<= 820px)
   ========================================= */
@media (max-width: 820px) {
    .header-inner {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .brand-svg {
        height: 28px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        padding: 12px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 10px 12px;
    }

    .main-nav.show {
        display: flex;
    }

    .nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-list a {
        display: inline-block;
        padding: 6px 10px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.08);
        font-size: 13px;
    }

    .btc-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }

    .wallet-actions {
        justify-content: center;
    }

    .wallet-actions .btn {
        flex: 1 1 160px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   7. Адаптив: большие мониторы и ТВ (Full HD / 4K)
   ========================================= */
@media (min-width: 1600px) {
    body { font-size: 17px; }
    .main-wrap { max-width: 1280px; }
    .header-inner, .footer-inner { max-width: 1400px; }
}

@media (min-width: 2400px) {
    body { font-size: 21px; }
    .main-wrap { max-width: 1700px; }
    .header-inner, .footer-inner { max-width: 1800px; }
    .nav-list a { font-size: 19px; }
    .brand-svg { height: 42px; }
}