:root {
    --ink: #102726;
    --ink-soft: #4d6260;
    --brand: #0e5550;
    --brand-light: #a9f4d8;
    --accent: #ef735d;
    --page: #dceae8;
    --surface: #f8faf8;
    --line: rgba(16, 39, 38, 0.13);
    --white: #ffffff;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-black.woff2") format("woff2");
    font-style: normal;
    font-weight: 900;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.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;
}

.hero {
    position: relative;
    width: 100%;
    min-height: clamp(210px, 26vh, 280px);
    display: grid;
    place-items: center;
    margin: 0;
    padding: 20px 20px 22px;
    overflow: hidden;
    background-color: #55d9d0;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 0;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -10px;
    background-image: url("../images/brand/top-background.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(5px);
    transform: scale(1.025);
}

.hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background: rgba(83, 222, 210, 0.16);
}

.hero__inner {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    text-align: center;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--ink);
    font-family: "Montserrat", "Arial Black", sans-serif;
    font-size: 4.1rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.24);
}

.brand__suffix {
    color: var(--accent);
}

.tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 14px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.tagline__icon {
    display: inline-flex;
    flex: 0 0 auto;
}

.tagline__icon img {
    width: 48px;
    height: 17px;
    display: block;
}

.search {
    width: min(100%, 800px);
    height: 50px;
    margin-inline: auto;
    display: flex;
    padding: 6px;
    background: var(--white);
    border: 1px solid rgba(16, 39, 38, 0.08);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 39, 38, 0.14);
}

.search:focus-within {
    outline: 3px solid rgba(239, 115, 93, 0.38);
    outline-offset: 3px;
}

.search input {
    min-width: 0;
    flex: 1;
    padding: 0 20px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.98rem;
}

.search input::placeholder {
    color: #869492;
}

.search button {
    width: 154px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--brand-light);
    background: var(--ink);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 800;
    transition: background-color 160ms ease, transform 160ms ease;
}

.search button:hover {
    background: #204a47;
}

.search button:active {
    transform: translateY(1px);
}

.content {
    width: min(calc(100% - 32px), 1760px);
    margin: 0 auto;
    padding: 52px 0 64px;
}

.catalog-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.catalog-section {
    min-width: 0;
}

.catalog-heading {
    position: relative;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 3px;
    padding: 29px 20px 10px;
    color: var(--ink);
    background: #c7dedb;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.catalog-heading__icon {
    position: absolute;
    top: -28px;
    left: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding: 4px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 5px 14px rgba(16, 39, 38, 0.2);
    transform: translateX(-50%);
}

.catalog-heading__icon > span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--brand);
    border-radius: 50%;
}

.catalog-heading__icon img {
    width: 34px;
    height: 34px;
    display: block;
}

.catalog-heading h2,
.catalog-heading p {
    margin: 0;
}

.catalog-heading h2 {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.15;
}

.catalog-heading p {
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 700;
}

.catalog-scroll {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
}

.catalog-actions {
    display: flex;
    justify-content: center;
    padding: 24px 0 0;
}

.catalog-more {
    min-width: 210px;
    min-height: 46px;
    padding: 0 24px;
    color: var(--white);
    background: var(--brand);
    border: 1px solid rgba(16, 39, 38, 0.18);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(16, 39, 38, 0.14);
    cursor: pointer;
    font-weight: 800;
    transition: background-color 160ms ease, transform 160ms ease;
}

.catalog-more:hover {
    background: #167069;
}

.catalog-more:active {
    transform: translateY(1px);
}

.catalog-more:focus-visible {
    outline: 3px solid rgba(239, 115, 93, 0.65);
    outline-offset: 3px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.game-card {
    min-width: 0;
    min-height: 132px;
    background: var(--white);
    border: 1px solid rgba(16, 39, 38, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 0 rgba(16, 39, 38, 0.05);
    content-visibility: auto;
    contain-intrinsic-size: auto 132px;
    overflow: hidden;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.game-card:hover {
    border-color: rgba(14, 85, 80, 0.3);
    box-shadow: 0 10px 24px rgba(16, 39, 38, 0.1);
    transform: translateY(-2px);
}

.game-card > a {
    position: relative;
    min-height: 130px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    text-decoration: none;
}

.game-card > a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -4px;
}

.game-card > a[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.58;
}

.game-card > a[aria-disabled="true"] .game-card__arrow {
    display: none;
}

.game-card__icon {
    --logo-inset: 8px;
    position: relative;
    width: 118px;
    height: 102px;
    flex: 0 0 auto;
    display: block;
    padding: 0;
    background: var(--brand);
    border-radius: 6px;
    overflow: hidden;
    contain: paint;
}

.game-card__icon img {
    position: absolute;
    inset: var(--logo-inset);
    width: calc(100% - (var(--logo-inset) * 2));
    height: calc(100% - (var(--logo-inset) * 2));
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    display: block;
    object-fit: contain;
    object-position: center;
}

.game-card__content {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.game-card__content strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.96rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.game-card__link::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    background: currentColor;
    -webkit-mask: url("../icons/external-link.svg") center / contain no-repeat;
    mask: url("../icons/external-link.svg") center / contain no-repeat;
}

.game-card__arrow {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #718481;
    font-size: 0.9rem;
}

.section-empty,
.empty-state {
    margin: 0;
    padding: 60px 20px;
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    text-align: center;
}

.section-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    border: 0;
}

.empty-state {
    margin-top: 18px;
}

[hidden] {
    display: none !important;
}

.site-footer {
    color: var(--ink);
    background: #c7e5e3;
    border-top: 1px solid rgba(16, 39, 38, 0.12);
}

.footer-main {
    width: min(calc(100% - 40px), 1380px);
    margin-inline: auto;
    padding: 44px 0 0;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--ink);
    text-decoration: none;
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1;
}

.footer-logo span {
    color: var(--accent);
}

.footer-brand strong {
    color: var(--ink);
}

.footer-brand p {
    max-width: 1120px;
    margin: 0;
    color: #3e5c59;
    font-size: 0.94rem;
    line-height: 1.85;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 42px;
    padding: 18px 0;
    border-top: 1px solid rgba(16, 39, 38, 0.22);
    color: #496360;
    font-size: 0.78rem;
    line-height: 1.5;
}

.footer-bottom p {
    max-width: 1060px;
    margin: 0;
}

.footer-bottom__brand {
    flex: 0 0 auto;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 900;
}

.footer-bottom__brand span {
    color: var(--accent);
}

@media (max-width: 1180px) {
    .catalog-columns {
        grid-template-columns: 1fr;
        gap: 54px;
    }

}

@media (max-width: 720px) {
    .hero {
        width: 100%;
        min-height: 230px;
        margin-top: 0;
        padding: 16px 14px 18px;
        background-position: center;
    }

    .brand {
        font-size: 3.65rem;
    }

    .tagline {
        margin: 10px auto 12px;
        font-size: 0.94rem;
    }

    .search {
        height: 50px;
    }

    .search input {
        padding-inline: 13px;
        font-size: 0.92rem;
    }

    .search button {
        width: 56px;
    }

    .search button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .content {
        width: calc(100% - 16px);
        padding: 46px 0 38px;
    }

    .catalog-columns {
        gap: 52px;
    }

    .catalog-scroll {
        padding: 9px;
    }

    .catalog-more {
        width: min(100%, 280px);
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .game-card {
        min-height: 205px;
    }

    .game-card > a {
        min-height: 203px;
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
        padding: 10px;
    }

    .game-card__icon {
        --logo-inset: 9px;
        width: 100%;
        height: 124px;
        padding: 0;
    }

    .game-card__content {
        width: 100%;
        align-items: center;
        gap: 7px;
    }

    .game-card__content strong {
        font-size: 0.88rem;
    }

    .game-card__link {
        gap: 4px;
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .game-card__link::before {
        width: 14px;
        height: 14px;
    }

    .game-card__arrow {
        display: none;
    }

    .footer-main {
        width: calc(100% - 32px);
        padding-top: 34px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: 12px;
    }
}

@media (max-width: 410px) {
    .brand {
        font-size: 3.15rem;
    }

    .tagline__icon img {
        width: 36px;
        height: 13px;
    }

    .game-card__icon {
        width: 100%;
        height: 110px;
    }

    .game-card > a {
        min-height: 190px;
        gap: 8px;
        padding: 8px;
    }

    .game-card__content strong {
        font-size: 0.78rem;
    }

    .game-card__link {
        font-size: 0.65rem;
    }
}

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