:root {
    --apg-black: #050505;
    --apg-ink: #161616;
    --apg-muted: #6f6a60;
    --apg-cream: #f7f3ea;
    --apg-card: #ffffff;
    --apg-gold: #b9954d;
    --apg-line: rgba(185, 149, 77, 0.32);
    --apg-shadow: 0 22px 55px rgba(0, 0, 0, 0.12);
}

html.apg-lock,
body.apg-standalone-body {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--apg-cream) !important;
}

body.apg-standalone-body * {
    box-sizing: border-box;
}

.apg-page {
    min-height: 100vh;
    color: var(--apg-ink);
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.92) 0, rgba(5, 5, 5, 0.92) 285px, transparent 285px),
        radial-gradient(circle at top left, rgba(185, 149, 77, 0.13), transparent 34rem),
        var(--apg-cream);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 46px 22px 70px;
}

.apg-hero,
.apg-password-card {
    width: min(1080px, 100%);
    margin: 0 auto;
    text-align: center;
    background: var(--apg-card);
    border: 1px solid rgba(185, 149, 77, 0.28);
    box-shadow: var(--apg-shadow);
    padding: clamp(30px, 5vw, 58px) clamp(20px, 5vw, 70px);
    position: relative;
    overflow: hidden;
}

.apg-hero:before,
.apg-password-card:before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(185, 149, 77, 0.22);
    pointer-events: none;
}

.apg-logo {
    display: block;
    width: min(230px, 72vw);
    height: auto;
    max-height: 150px;
    object-fit: contain;
    margin: 0 auto 24px;
    background: transparent;
}

.apg-kicker {
    color: var(--apg-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.apg-hero h1,
.apg-password-card h1 {
    margin: 0;
    color: var(--apg-ink);
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 7vw, 86px);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: -0.035em;
}

.apg-hero p,
.apg-password-card p {
    width: min(620px, 100%);
    margin: 20px auto 0;
    color: var(--apg-muted);
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.65;
}

.apg-gallery {
    width: min(1180px, 100%);
    margin: 42px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 20px;
}

.apg-photo-card {
    margin: 0;
    background: #fff;
    border: 1px solid rgba(185, 149, 77, 0.22);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.apg-photo-card figcaption {
    margin: 0;
    padding: 12px 12px 14px;
    text-align: center;
}

.apg-download {
    color: var(--apg-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(185, 149, 77, 0.55);
}

.apg-download:hover,
.apg-download:focus-visible {
    color: var(--apg-gold);
}

.apg-photo {
    display: block;
    width: 100%;
    appearance: none;
    border: 0;
    padding: 0;
    background: #111;
    cursor: pointer;
    overflow: hidden;
    box-shadow: none;
    aspect-ratio: 4 / 5;
    position: relative;
}

.apg-photo:after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.apg-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform 280ms ease, filter 280ms ease;
}

.apg-photo:hover img,
.apg-photo:focus-visible img {
    transform: scale(1.055);
    filter: brightness(0.92);
}

.apg-photo:hover:after,
.apg-photo:focus-visible:after {
    opacity: 1;
}

.apg-empty {
    width: min(780px, 100%);
    margin: 42px auto 0;
    background: #fff;
    border: 1px dashed rgba(185, 149, 77, 0.42);
    text-align: center;
    padding: 52px 24px;
    box-shadow: var(--apg-shadow);
}

.apg-empty h2 {
    margin: 0 0 10px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 34px;
    color: var(--apg-ink);
}

.apg-empty p {
    margin: 0;
    color: var(--apg-muted);
}

.apg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    display: grid;
    place-items: center;
    padding: 28px;
}

.apg-lightbox[hidden] {
    display: none !important;
}

.apg-lightbox img {
    max-width: min(1180px, 96vw);
    max-height: 88vh;
    object-fit: contain;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.apg-lightbox-close {
    position: fixed;
    top: 18px;
    right: 20px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.apg-lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 52px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.apg-lightbox-prev {
    left: 20px;
}

.apg-lightbox-next {
    right: 20px;
}

.apg-lightbox-close:hover,
.apg-lightbox-arrow:hover,
.apg-lightbox-close:focus-visible,
.apg-lightbox-arrow:focus-visible {
    background: rgba(255, 255, 255, 0.18);
}

.apg-lightbox-download {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    color: #111;
    background: #fff;
    border: 1px solid rgba(185, 149, 77, 0.65);
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.apg-password-page {
    display: grid;
    place-items: center;
}

.apg-password-card {
    max-width: 620px;
}

.apg-password-form {
    margin-top: 25px;
}

.apg-password-form form {
    margin: 0;
}

.apg-password-form p {
    margin: 0 auto;
}

.apg-password-form label {
    display: block;
    color: var(--apg-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.apg-password-form input[type="password"] {
    width: min(360px, 100%);
    height: 48px;
    border: 1px solid rgba(185, 149, 77, 0.45);
    background: #fff;
    padding: 0 14px;
    font-size: 17px;
    outline: none;
}

.apg-password-form input[type="submit"] {
    height: 48px;
    border: 0;
    background: var(--apg-black);
    color: #fff;
    padding: 0 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    margin-left: 8px;
}

@media (max-width: 720px) {
    .apg-page {
        padding: 28px 14px 45px;
        background:
            linear-gradient(180deg, rgba(5, 5, 5, 0.94) 0, rgba(5, 5, 5, 0.94) 210px, transparent 210px),
            var(--apg-cream);
    }

    .apg-hero,
    .apg-password-card {
        padding: 30px 20px;
    }

    .apg-logo {
        width: min(190px, 76vw);
        max-height: 125px;
    }

    .apg-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 24px;
    }

    .apg-photo-card figcaption {
        padding: 10px 8px 12px;
    }

    .apg-download {
        font-size: 11px;
    }

    .apg-lightbox {
        padding: 18px;
    }

    .apg-lightbox-arrow {
        width: 42px;
        height: 58px;
        font-size: 42px;
    }

    .apg-lightbox-prev {
        left: 8px;
    }

    .apg-lightbox-next {
        right: 8px;
    }

    .apg-lightbox-download {
        bottom: 14px;
        font-size: 11px;
        padding: 9px 12px;
    }

    .apg-password-form input[type="submit"] {
        width: min(360px, 100%);
        margin: 10px 0 0;
    }
}

.apg-password-error {
    width: min(420px, 100%);
    margin: 18px auto 0;
    padding: 12px 14px;
    border: 1px solid rgba(130, 32, 32, 0.25);
    background: #fff3f0;
    color: #7d241f;
    font-size: 14px;
    line-height: 1.4;
}

.apg-password-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: stretch;
    margin-top: 10px;
}

.apg-password-form button[type="submit"] {
    height: 48px;
    border: 0;
    background: var(--apg-black);
    color: #fff;
    padding: 0 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.apg-password-form button[type="submit"]:hover,
.apg-password-form button[type="submit"]:focus-visible {
    background: #262626;
}

@media (max-width: 720px) {
    .apg-password-row {
        display: block;
    }

    .apg-password-form button[type="submit"] {
        width: min(360px, 100%);
        margin: 10px 0 0;
    }
}
