* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f5f3ee;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
}

.site-header {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 24px;
    pointer-events: none;
}

.wordmark {
    pointer-events: auto;
    color: #111;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: .04em;
}

.menu-button {
    pointer-events: auto;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 5px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.menu-button span {
    display: block;
    width: 23px;
    height: 1px;
    background: #111;
    transition: transform .25s ease, opacity .2s ease;
}

.gallery {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3ee;
    touch-action: pan-y;
    cursor: pointer;
    outline: none;
}

.gallery-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-image.active {
    opacity: 1;
    visibility: visible;
}

.counter {
    position: fixed;
    z-index: 5;
    right: 24px;
    bottom: 22px;
    font-size: 11px;
    letter-spacing: .08em;
    opacity: .65;
}

.hint {
    position: fixed;
    z-index: 5;
    left: 24px;
    bottom: 22px;
    font-size: 11px;
    letter-spacing: .08em;
    opacity: .45;
    transition: opacity .5s ease;
}

.hint.hidden {
    opacity: 0;
}

.empty-state {
    font-size: 14px;
}

.menu-overlay {
    position: fixed;
    z-index: 50;
    inset: 0;
    background: rgba(245, 243, 238, .98);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.close-button {
    position: absolute;
    z-index: 5;
    top: 18px;
    right: 22px;
    border: 0;
    background: transparent;
    font-size: 34px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
}

.menu {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: center;
}

.menu button {
    border: 0;
    background: none;
    color: #111;
    cursor: pointer;
    font: inherit;
    font-size: clamp(28px, 5vw, 54px);
    font-weight: 300;
    letter-spacing: -.03em;
}

.panel {
    position: absolute;
    inset: 0;
    display: none;
    padding: 100px max(24px, 8vw);
    background: #f5f3ee;
    overflow-y: auto;
}

.panel.active {
    display: block;
}

.panel-content {
    max-width: 700px;
    margin: 8vh auto 0;
}

.panel h1 {
    font-size: clamp(34px, 6vw, 72px);
    font-weight: 300;
    margin: 0 0 45px;
    letter-spacing: -.04em;
}

.panel p {
    max-width: 600px;
    font-size: 18px;
    line-height: 1.55;
    margin: 0 0 22px;
}

.panel a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.small-note {
    opacity: .55;
}

.back-button {
    position: absolute;
    top: 24px;
    left: 24px;
    border: 0;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .site-header {
        padding: 17px 18px;
    }

    .counter,
    .hint {
        bottom: 17px;
    }

    .counter {
        right: 18px;
    }

    .hint {
        left: 18px;
    }

    .gallery-image {
        max-width: 94%;
        max-height: 94%;
    }

    .panel {
        padding: 80px 24px;
    }
}
