/* First-screen composition, with the discovery content styled separately. */
.welcome-header {
    background: #090a0c;
    border-bottom-color: #ffffff12;
}

.gallery-hero {
    display: grid;
    grid-template-rows: 1fr auto minmax(170px, 1.5fr) auto 1fr auto;
    min-height: 650px;
    height: min(860px, calc(100svh - 146px));
}

.gallery-heading {
    grid-row: 2;
    position: relative;
    z-index: 2;
    padding: 6px 20px 18px;
    text-align: center;
}

.gallery-eyebrow {
    margin: 0 0 16px;
    color: #abb0b6;
    font-size: .8125rem;
    font-weight: 500;
}

.gallery-hero h1 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 4.5rem;
    line-height: 1.03;
    font-weight: 400;
    color: #f5f5f3;
}

.gallery-hero h1 span {
    margin: 3px 0 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    color: inherit;
}

.gallery-stage {
    grid-row: 3;
    min-height: 0;
    position: relative;
    pointer-events: none;
}

#hero-gallery-scene,
.hero-gallery-fallback {
    inset: 0;
    position: absolute;
    inset: -80px 0;
}

#hero-gallery-scene {
    z-index: 1;
    opacity: 0;
    transition: opacity 650ms ease;
}

.hero-gallery-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    transition: opacity 500ms ease;
}

.hero-gallery-image {
    width: auto;
    height: 72%;
    max-height: 180px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    flex: 0 0 auto;
}

.hero-gallery-image:nth-child(4n + 1) { transform: translateY(-6px) rotate(-6deg); }
.hero-gallery-image:nth-child(4n + 2) { transform: translateY(6px) rotate(4deg); }
.hero-gallery-image:nth-child(4n + 3) { transform: translateY(-4px) rotate(-2deg); }

[data-gallery="ready"] #hero-gallery-scene { opacity: 1; }
[data-gallery="ready"] .hero-gallery-fallback { opacity: 0; visibility: hidden; }

.gallery-caption {
    grid-row: 4;
    z-index: 2;
    position: relative;
    text-align: center;
    padding: 20px 20px 0;
}

.gallery-caption p {
    margin: 0 auto 24px;
    color: #b9bec4;
    font-size: .875rem;
    line-height: 1.8;
}

.gallery-caption p strong {
    color: #eef2f4;
    font-weight: 550;
}

.welcome .gallery-enter {
    background: #f3f5f5;
    border: 1px solid #f3f5f5;
    color: #131619;
    border-radius: 6px;
    min-height: 48px;
    padding: 12px 20px;
    gap: 24px;
    box-shadow: 0 3px 22px #00000024;
}

.welcome .gallery-enter:hover {
    background: #b6f1f4;
    border-color: #b6f1f4;
    color: #10191c;
}

.gallery-footer {
    grid-row: 6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 58px;
    font-size: .625rem;
    color: #858e98;
    position: relative;
    z-index: 2;
}

.gallery-footer > * {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-footer a { min-height: 44px; color: #c1cbd0; }
.gallery-footer svg { width: 13px; height: 13px; }

@media (min-width: 1600px) and (min-height: 850px) {
    .gallery-hero h1 { font-size: 5rem; }
}

@media (max-width: 700px) {
    .gallery-hero {
        height: calc(100svh - 130px);
        min-height: 555px;
        grid-template-rows: 1fr auto minmax(165px, 1.3fr) auto 1fr auto;
    }
    .gallery-heading { padding-bottom: 20px; }
    .gallery-hero h1 { font-size: 3.25rem; }
    .gallery-eyebrow { margin-bottom: 14px; font-size: .6875rem; }
    #hero-gallery-scene { inset-block: -32px; }
    .gallery-caption { padding-top: 18px; }
    .gallery-caption p { font-size: .8125rem; margin-bottom: 20px; }
    .gallery-footer { font-size: .5625rem; min-height: 46px; }
    .gallery-footer > span:last-child { display: none; }
}

@media (max-height: 790px) and (min-width: 701px) {
    .gallery-hero {
        min-height: 540px;
        grid-template-rows: 1fr auto minmax(150px, 1.2fr) auto 1fr auto;
    }
    .gallery-heading { padding-bottom: 10px; }
    .gallery-hero h1 { font-size: 3.5rem; }
    .gallery-eyebrow { margin-bottom: 10px; }
    .gallery-caption { padding-top: 14px; }
    .gallery-caption p { margin-bottom: 16px; }
    #hero-gallery-scene { inset-block: -50px; }
}

@media (max-width: 380px) {
    .gallery-hero h1 { font-size: 2.875rem; }
    .gallery-caption p { font-size: .75rem; }
}

@media (max-height: 670px) and (max-width: 700px) {
    .gallery-hero {
        min-height: 480px;
        grid-template-rows: 1fr auto minmax(125px, 1fr) auto 1fr auto;
    }
    .gallery-hero h1 { font-size: 2.75rem; }
    .gallery-eyebrow { margin-bottom: 8px; }
    .gallery-heading { padding-bottom: 12px; }
    .gallery-caption p { margin-bottom: 14px; }
}

@media (max-height: 520px) and (min-width: 600px) {
    .gallery-hero {
        height: calc(100svh - 110px);
        min-height: 250px;
        grid-template-rows: 1fr auto minmax(80px, 1.3fr) auto 1fr auto;
    }
    .gallery-heading { padding-block: 6px; }
    .gallery-eyebrow,
    .gallery-caption p { display: none; }
    .gallery-hero h1 { font-size: 2.25rem; }
    .gallery-hero h1 span { display: inline; margin-left: 8px; }
    #hero-gallery-scene { inset-block: -22px; }
    .gallery-caption { padding-top: 10px; }
    .gallery-footer { min-height: 30px; }
    .gallery-footer a { min-height: 30px; }
}
