/* The homepage uses normal document flow: translated copy determines its height. */
body.site-home {
    --home-yellow: #fbd765;
    --home-paper: #fff9f4;
}

/* Match the larger Bootstrap row gutters in the news and store sections. */
body.site-home section > .container {
    padding-inline: clamp(20px, 2.3vw, 32px);
}

body.site-home header.site-header {
    position: relative;
    float: none !important;
    background: var(--home-yellow);
}

body.site-home header.site-header .navbar {
    margin-top: 0 !important;
    padding: 16px 0;
}

body.site-home header.site-header .navbar > .container {
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    max-width: 1440px;
    padding-inline: 32px;
}

body.site-home header.site-header .navbar-brand {
    margin: 0 !important;
}

body.site-home header.site-header .navbar-brand img {
    display: block;
    width: 94px;
}

body.site-home header.site-header .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    padding: 8px clamp(6px, .65vw, 10px) !important;
    font-size: 18px;
    line-height: 1.2;
}

body.site-home .desktop-language-switcher {
    margin: 0;
    padding: 3px;
    gap: 0;
    border-radius: 6px;
    box-shadow: none;
}

body.site-home header.site-header .localhost-locale-switcher {
    flex-basis: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
}

body.site-home .site-language-pill {
    min-height: 44px;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    gap: 5px;
    box-shadow: none;
    transform: none;
    transition: background-color 160ms ease, color 160ms ease;
}

body.site-home .site-language-flag {
    font-size: 14px;
}

body.site-home .store-header-actions {
    margin-left: 0;
    gap: 8px;
}

body.site-home .store-header-actions a {
    min-height: 46px;
    padding: 0 8px 0 0;
    gap: 2px;
    font-size: 13px;
    border-color: transparent;
}

body.site-home .store-action-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
}

body.site-home .store-cart-count {
    min-width: 18px;
    height: 18px;
    font-size: 11px;
}

body.site-home .home-hero {
    clear: both;
    position: relative;
    isolation: isolate;
    background: var(--home-yellow) url('../images/banner-bg.jpg') center / cover no-repeat;
}

/* Paint over the artwork's straight bottom edge without covering the actions. */
.home-hero::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: clamp(56px, 7vw, 100px);
    background: url('../images/edge1-d.png') center bottom / 100% 100% no-repeat;
    pointer-events: none;
    z-index: 1;
}

.home-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 24px;
    max-width: 1440px;
    min-height: min(640px, calc(100svh - 108px));
    margin-inline: auto;
    padding-inline: 32px;
}

.home-hero-copy {
    min-width: 0;
    padding-block: 40px 64px;
    animation: home-appear 450ms ease both;
}

body.site-home .home-hero h1 {
    max-width: 650px;
    margin: 0;
    color: var(--secondcolor);
    font-size: clamp(56px, 5.6vw, 84px);
    line-height: 1.02;
    font-weight: 400;
    text-wrap: balance;
    overflow-wrap: break-word;
    -webkit-text-stroke: 1.5px #fff;
    paint-order: stroke fill;
}

html:is([lang="uk"], [lang="ru"]) body.site-home .home-hero h1 {
    font-family: "Roboto Condensed", "Neucha-Regular", sans-serif;
    font-style: italic;
    font-weight: 700;
    text-transform: uppercase;
    -webkit-text-stroke-width: 0;
}

body.site-home .home-hero-lead {
    max-width: 490px;
    margin: 20px 0 0;
    color: #453814;
    font-size: 21px;
    line-height: 1.45;
}

.home-hero .auction-home-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 24px;
    max-width: 560px;
    margin: 24px 0 0;
    padding: 20px 0;
    border-top: 1px solid #8d773d;
    border-bottom: 1px solid #8d773d;
    text-align: left;
}

.home-hero .auction-home-link > strong {
    font-size: 28px;
    line-height: 1.1;
}

.home-hero .auction-home-link > p {
    margin: 6px 0 0;
    font-size: 17px;
    line-height: 1.35;
}

.home-hero .auction-home-link > a {
    grid-column: 2;
    grid-row: 1 / 3;
    gap: 16px;
    width: auto;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 18px;
    background: #b9086d;
    transition: background-color 160ms ease;
}

.home-hero .auction-home-link > a:hover {
    background: #030303;
}

.home-hero .app-download-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.home-hero .app-download-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    overflow: hidden;
    transition: opacity 160ms ease;
}

.home-hero .app-download-badge:hover {
    opacity: .8;
}

.home-hero .app-download-badge img {
    display: block;
    width: auto;
    height: 100%;
    max-width: none;
}

/* The raster Google badges include transparent padding around the artwork. */
.home-hero .app-download-badge-raster img {
    height: 130%;
}

.home-hero-art {
    align-self: end;
    margin: 0;
    min-width: 0;
    animation: home-appear 650ms ease both;
}

.home-hero-art img {
    display: block;
    width: 100%;
    height: auto;
}

body.site-home .secondhand-section {
    padding: 72px 0;
    background: var(--home-paper);
}

body.site-home .secondhand-section > .container {
    max-width: 1280px;
    padding-inline: 32px;
}

body.site-home .secondhand-section h2 {
    font-size: clamp(32px, 3vw, 44px);
    line-height: 1.1;
    margin-bottom: 20px;
}

body.site-home .secondhand-section p.lead {
    font-size: 18px;
    line-height: 1.55;
    margin-bottom: 24px;
}

body.site-home .secondhand-hero img {
    max-width: 380px;
    filter: none;
}

body.site-home .secondhand-features {
    display: block;
    margin: 0;
}

body.site-home .secondhand-feature-card {
    padding: 16px 0;
    border: 0;
    border-top: 1px solid #dfd4c9;
    border-radius: 0;
    background: transparent;
}

body.site-home .secondhand-feature-card h4 {
    margin-bottom: 6px;
    font-size: 20px;
}

body.site-home .secondhand-feature-card p {
    font-size: 17px;
    line-height: 1.45;
}

body.site-home .secondhand-credit-note {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
}

body.site-home :is(a, button, select):focus-visible {
    outline: 3px solid #030303 !important;
    outline-offset: 4px;
}

/* Switch to the drawer before the full, translated navigation becomes crowded. */
@media (max-width: 1199.98px) {
    body.site-home header.site-header .navbar-collapse,
    body.site-home header.site-header .desktop-language-switcher,
    body.site-home header.site-header .localhost-locale-switcher {
        display: none !important;
    }

    body.site-home header.site-header .navbar > .container {
        justify-content: flex-start;
        min-height: 0;
    }

    body.site-home header.site-header .bargur {
        position: static !important;
        order: 3;
        display: flex !important;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        padding: 8px !important;
        background: transparent !important;
        border: 1px solid #8d773d !important;
        border-radius: 4px !important;
    }

    body.site-home header.site-header .bargur img {
        width: 26px;
        height: 26px;
    }

    body.site-home header.site-header .store-header-actions {
        display: flex !important;
        margin-left: auto;
    }

    body.site-home .home-hero-inner {
        gap: 16px;
        min-height: 540px;
    }

    body.site-home .home-hero h1 {
        font-size: clamp(46px, 6vw, 66px);
    }

    .home-hero .auction-home-link {
        column-gap: 12px;
    }

    .home-hero .auction-home-link > a {
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    body.site-home header.site-header .navbar {
        padding: 12px 0;
    }

    body.site-home header.site-header .navbar > .container {
        padding-inline: 20px;
        gap: 12px;
    }

    body.site-home header.site-header .navbar-brand img {
        width: 72px;
    }

    body.site-home .store-header-actions {
        gap: 4px;
    }

    body.site-home .store-header-actions a {
        padding: 0;
        min-width: 44px;
        min-height: 44px;
    }

    body.site-home .store-header-actions a > span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body.site-home .home-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        min-height: 0;
        padding-inline: 20px;
    }

    .home-hero-copy {
        padding-block: 24px 0;
    }

    body.site-home .home-hero h1 {
        max-width: 540px;
        font-size: clamp(40px, 10.8vw, 62px);
        line-height: 1.04;
        -webkit-text-stroke-width: 1px;
    }

    body.site-home .home-hero-lead {
        margin-top: 14px;
        font-size: 18px;
        line-height: 1.4;
    }

    .home-hero .auction-home-link {
        max-width: none;
        margin-top: 20px;
        padding-block: 16px;
        gap: 0 16px;
    }

    .home-hero .auction-home-link > strong {
        font-size: 25px;
    }

    .home-hero .auction-home-link > p {
        font-size: 15px;
    }

    .home-hero .app-download-links {
        gap: 8px;
        margin-top: 18px;
    }

    .home-hero .app-download-badge {
        height: clamp(38px, 10.2vw, 46px);
    }

    .home-hero-art {
        justify-self: end;
        width: min(100%, 390px);
        margin-top: 20px;
    }

    .home-hero-art img {
        max-height: 240px;
        object-fit: contain;
        object-position: right bottom;
    }

    body.site-home .secondhand-section {
        padding: 40px 0;
    }

    body.site-home .secondhand-section > .container {
        padding-inline: 20px;
    }

    body.site-home .secondhand-hero img {
        max-width: 240px;
    }
}

@keyframes home-appear {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

    body.site-home [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}
