:root {
    --ink: #111111;
    --gray: #858585;
    --soft-gray: #f1f0ed;
    --white: #ffffff;
    --blue: #25aee4;
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--soft-gray);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.page {
    width: min(1720px, calc(100% - 56px));
    margin: 34px auto 84px;
}

.topbar {
    display: grid;
    grid-template-columns: 318px minmax(0, 1fr) clamp(205px, 15.25vw, 228px);
    gap: clamp(22px, 3vw, 48px);
    align-items: center;
}

.ettp-logo,
.ftb-logo {
    display: block;
    width: 100%;
    height: auto;
}

.side-ftb,
.bottom-badges {
    display: none;
}

.nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px clamp(4px, 0.8vw, 18px);
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: clamp(1.55rem, 2.05vw, 2.45rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.nav a {
    display: inline-block;
    max-width: 100%;
    justify-self: center;
    text-decoration: none;
    white-space: nowrap;
}

.layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 50px;
    margin-top: 30px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.btn {
    display: inline-flex;
    min-width: 250px;
    min-height: 66px;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    outline: 2px solid var(--gray);
    border-radius: 4px;
    background: var(--gray);
    color: var(--white);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 160ms ease, background 160ms ease;
}

.btn:hover,
.btn:focus-visible {
    background: #6f6f6f;
    transform: translateY(-2px);
}

.donate {
    display: block;
    text-align: center;
    text-decoration: none;
}

.donate img {
    display: block;
    width: 134px;
    height: auto;
    margin: 0 auto;
    transition: transform 160ms ease, filter 160ms ease;
}

.donate:hover img,
.donate:focus-visible img {
    filter: contrast(1.05);
    transform: translateY(-2px);
}

.side-ftb img,
.bottom-ftb img {
    display: block;
    width: min(215px, 100%);
    height: auto;
}

.bottom-donate img {
    display: block;
    width: 134px;
    height: auto;
}

.mosaic {
    display: grid;
    grid-template-columns: 1fr 1.12fr 0.93fr;
    grid-template-rows: 220px 372px 227px;
    gap: 10px;
}

.panel {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 160px;
    background: #d8d8d8;
    color: var(--white);
    text-decoration: none;
}

.panel img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease, filter 300ms ease;
}

.panel::after {
    position: absolute;
    inset: 0;
    content: "";
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    transition: opacity 220ms ease;
}

.panel-copy {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    text-align: center;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
    transform: translateY(8px);
    transition: opacity 220ms ease, transform 220ms ease;
}

.panel h2 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(1.7rem, 2.25vw, 2.7rem);
    font-weight: 900;
    line-height: 1.12;
    text-transform: uppercase;
}

.panel:hover::after,
.panel:focus-visible::after,
.panel:hover .panel-copy,
.panel:focus-visible .panel-copy {
    opacity: 1;
}

.panel:hover .panel-copy,
.panel:focus-visible .panel-copy {
    transform: translateY(0);
}

.panel:hover img,
.panel:focus-visible img {
    transform: scale(1.035);
    filter: saturate(1.04);
}

.support {
    grid-area: 1 / 1 / 2 / 2;
}

.food {
    grid-area: 2 / 1 / 4 / 2;
}

.active {
    grid-area: 1 / 2 / 3 / 3;
}

.organize {
    grid-area: 1 / 3 / 2 / 4;
}

.books {
    grid-area: 2 / 3 / 3 / 4;
}

.gardens {
    grid-area: 3 / 2 / 4 / 4;
}

.placeholder-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.placeholder-card {
    width: min(640px, 100%);
    padding: 38px;
    border-radius: 4px;
    background: #ffffff;
    text-align: center;
    box-shadow: var(--shadow);
}

.placeholder-card img {
    width: min(320px, 100%);
    height: auto;
    margin-bottom: 18px;
}

.placeholder-card h1 {
    margin: 0 0 12px;
    color: var(--gray);
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.placeholder-card p {
    margin: 0 0 24px;
    font-size: 1.08rem;
    line-height: 1.6;
}

@media (hover: none), (max-width: 900px) {
    .panel::after,
    .panel-copy {
        opacity: 1;
    }

    .panel-copy {
        align-items: center;
        justify-content: center;
        transform: none;
        background: rgba(0, 0, 0, 0.42);
    }
}

@media (min-width: 1341px) and (max-width: 1494px) {
    .nav {
        font-size: clamp(1.55rem, calc(3.8vw - 1.64rem), 2.45rem);
    }
}

@media (max-width: 1340px) {
    .topbar {
        grid-template-columns: minmax(220px, 318px) minmax(0, 1fr);
    }

    .top-ftb {
        display: none;
    }
}

@media (min-width: 1221px) and (max-width: 1340px) {
    .side-ftb {
        display: block;
    }
}

@media (max-width: 1220px) {
    .topbar {
        grid-template-columns: 1fr;
        gap: 26px;
        justify-items: center;
    }

    .ettp-logo {
        max-width: 360px;
    }

    .nav {
        width: min(960px, 100%);
        gap: 14px 24px;
        font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    }

    .layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .sidebar {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .donate {
        display: none;
    }

    .bottom-badges {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(28px, 8vw, 72px);
        margin-top: 34px;
    }
}

@media (max-width: 964px) {
    .nav {
        display: grid;
        width: min(640px, 100%);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 14px;
        font-size: 1.75rem;
    }
}

@media (max-width: 820px) {
    .page {
        width: min(100% - 28px, 620px);
        margin-top: 22px;
    }

    .topbar {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-items: center;
    }

    .ettp-logo {
        max-width: 320px;
    }

    .nav {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 14px;
        font-size: 1.7rem;
    }

    .btn {
        width: min(100%, 280px);
        min-height: 58px;
        font-size: 1.55rem;
    }

    .mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .panel {
        grid-area: auto;
        aspect-ratio: 4 / 3;
    }

    .organize,
    .gardens {
        aspect-ratio: 16 / 9;
    }

    .panel h2 {
        font-size: 1.8rem;
    }

    .bottom-badges {
        gap: 24px;
    }

    .bottom-ftb img {
        width: min(190px, 42vw);
    }

    .bottom-donate img {
        width: min(120px, 28vw);
    }
}
