/*
    OPALINE STUDIO — GALLERY PAGE

    This stylesheet contains only styles used by gallery.html.
    Shared navigation, buttons, footer and typography remain in style.css.
*/

/*
    GALLERY HERO
*/

/* Main Gallery page Hero. */
.gallery-hero {
    position: relative;
    isolation: isolate;
    min-height: 92vh;
    padding: 0 var(--page-padding);
    color: var(--text-light);
    background:
        radial-gradient(
            circle at 74% 18%,
            rgba(169, 217, 234, 0.18),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(200, 183, 229, 0.14),
            transparent 28%
        ),
        radial-gradient(
            circle at 17% 88%,
            rgba(239, 170, 138, 0.08),
            transparent 24%
        ),
        linear-gradient(
            135deg,
            #282e42 0%,
            var(--ink-soft) 42%,
            var(--ink) 100%
        );
    overflow: hidden;
}

/* Large editorial background word. */
.gallery-hero::before {
    content: "GALLERY";
    position: absolute;
    right: -4vw;
    bottom: -3vw;
    z-index: -1;
    font-family: var(--heading-font);
    font-size: clamp(12rem, 24vw, 27rem);
    font-weight: 600;
    line-height: 0.68;
    letter-spacing: -0.07em;
    color: rgba(255, 255, 255, 0.026);
    pointer-events: none;
}

/* Fine editorial grid. */
.gallery-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.16;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.014) 1px,
            transparent 1px
        );
    background-size: 72px 72px;
    mask-image:
        linear-gradient(
            to right,
            transparent,
            black 35%,
            black
        );
    pointer-events: none;
}

/* Two-column Gallery Hero layout. */
.gallery-hero-layout {
    display: grid;
    grid-template-columns: minmax(430px, 0.92fr) minmax(500px, 1.08fr);
    align-items: center;
    gap: clamp(60px, 7vw, 120px);
    min-height: 92vh;
    padding: 105px 0 90px;
}

/* Main Gallery Hero copy. */
.gallery-hero-copy {
    position: relative;
    max-width: 730px;
}

/* Vertical editorial line beside the heading. */
.gallery-hero-copy::before {
    content: "";
    position: absolute;
    top: 4px;
    left: -34px;
    width: 1px;
    height: 120px;
    background:
        linear-gradient(
            to bottom,
            var(--opal-blue),
            var(--opal-lilac),
            transparent
        );
}

/* Main Gallery page heading. */
.gallery-hero-copy h1 {
    max-width: 800px;
    margin-bottom: 35px;
    font-family: var(--heading-font);
    font-size: clamp(5rem, 7vw, 8rem);
    font-weight: 500;
    line-height: 0.82;
    letter-spacing: -0.05em;
    color: var(--white);
    text-wrap: balance;
}

/* Gallery Hero introduction. */
.gallery-hero-copy > p {
    max-width: 590px;
    margin-bottom: 42px;
    font-size: 1.04rem;
    line-height: 1.92;
    color: rgba(255, 255, 255, 0.76);
}

/* Gallery Hero button layout. */
.gallery-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

/* Gallery Hero visual composition. */
.gallery-hero-visual {
    position: relative;
    min-height: 720px;
}

/* Main arched image frame. */
.gallery-hero-main-frame {
    position: absolute;
    top: 48%;
    left: 52%;
    width: min(70%, 520px);
    aspect-ratio: 0.76;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 230px 230px 12px 12px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.72),
            rgba(169, 217, 234, 0.2),
            rgba(200, 183, 229, 0.18),
            rgba(239, 170, 138, 0.18)
        );
    box-shadow:
        0 42px 100px rgba(0, 0, 0, 0.34),
        inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    transform: translate(-50%, -50%);
}

/* Main frame outer contour. */
.gallery-hero-main-frame::before {
    content: "";
    position: absolute;
    inset: -23px;
    z-index: -1;
    border: 1px solid rgba(220, 228, 234, 0.45);
    border-radius: 252px 252px 16px 16px;
    box-shadow: 0 0 50px rgba(169, 217, 234, 0.08);
}

/* Main frame inner contour. */
.gallery-hero-main-frame::after {
    content: "";
    position: absolute;
    inset: 18px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 205px 205px 7px 7px;
    pointer-events: none;
}

/* Main Hero placeholder. */
.gallery-hero-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 218px 218px 6px 6px;
}

/* Real main Hero image. */
.gallery-hero-image {
    width: 100%;
    height: 100%;
    border-radius: 218px 218px 6px 6px;
    object-fit: cover;
}

/* Smaller supporting image frame. */
.gallery-hero-secondary-frame {
    position: absolute;
    right: -1%;
    bottom: 4%;
    z-index: 4;
    width: min(36%, 250px);
    aspect-ratio: 1;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.8),
            rgba(169, 217, 234, 0.24),
            rgba(200, 183, 229, 0.2)
        );
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.28);
}

/* Supporting image placeholder. */
.gallery-hero-secondary-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Real supporting image. */
.gallery-hero-secondary-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Editorial note card. */
.gallery-hero-note {
    position: absolute;
    left: 1%;
    bottom: 12%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    max-width: 220px;
    padding: 24px 26px;
    border-top: 2px solid var(--opal-gold);
    color: var(--white);
    background:
        linear-gradient(
            145deg,
            #272d40,
            var(--ink)
        );
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.24);
}

/* Editorial note label. */
.gallery-hero-note span {
    margin-bottom: 8px;
    font-size: 0.62rem;
    letter-spacing: 0.17em;
    color: var(--opal-peach);
    text-transform: uppercase;
}

/* Editorial note value. */
.gallery-hero-note strong {
    font-family: var(--heading-font);
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.05;
}

/* Vertical decorative text. */
.gallery-hero-vertical-text {
    position: absolute;
    right: -22px;
    bottom: 170px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: rgba(255, 255, 255, 0.45);
    writing-mode: vertical-rl;
}

/* Shared decorative Hero glow. */
.gallery-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(16px);
    pointer-events: none;
}

/* Cool Gallery Hero glow. */
.gallery-hero-glow-one {
    top: -120px;
    right: 20%;
    width: 360px;
    height: 360px;
    background-color: rgba(169, 217, 234, 0.11);
}

/* Warm Gallery Hero glow. */
.gallery-hero-glow-two {
    right: -150px;
    bottom: 10px;
    width: 400px;
    height: 400px;
    background-color: rgba(239, 170, 138, 0.07);
}

/*
    GALLERY COLLECTION
*/

/* Gallery collection background. */
.gallery-collection-section {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(
            180deg,
            var(--pearl) 0%,
            #f5f1f5 100%
        );
    overflow: hidden;
}

/* Large background word. */
.gallery-collection-section::before {
    content: "PORTFOLIO";
    position: absolute;
    top: 65px;
    left: -2vw;
    z-index: -1;
    font-family: var(--heading-font);
    font-size: clamp(9rem, 18vw, 20rem);
    font-weight: 600;
    line-height: 0.7;
    letter-spacing: -0.06em;
    color: rgba(16, 19, 29, 0.023);
    pointer-events: none;
}

/* Gallery heading layout. */
.gallery-collection-heading {
    display: grid;
    grid-template-columns: 1.1fr 0.65fr;
    align-items: end;
    gap: 70px;
    margin-bottom: 55px;
}

/* Gallery collection title. */
.gallery-collection-heading h2 {
    max-width: 800px;
    font-family: var(--heading-font);
    font-size: clamp(4.1rem, 5.8vw, 6.7rem);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--ink);
}

/* Gallery collection introduction. */
.gallery-collection-heading > p {
    max-width: 480px;
    font-size: 0.96rem;
    line-height: 1.9;
}

/* Filter button bar. */
.gallery-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 55px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--light-border);
}

/* Individual filter button. */
.gallery-filter-button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(16, 19, 29, 0.1);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: var(--ink-muted);
    background-color: rgba(255, 255, 255, 0.42);
    text-transform: uppercase;
    transition: var(--transition);
}

/* Filter button hover. */
.gallery-filter-button:hover {
    border-color: rgba(169, 217, 234, 0.35);
    color: var(--ink);
    background-color: rgba(255, 255, 255, 0.72);
    transform: translateY(-2px);
}

/* Selected filter button. */
.gallery-filter-button.active {
    border-color: transparent;
    color: var(--ink);
    background: var(--opal-gradient);
    box-shadow: 0 12px 28px rgba(16, 19, 29, 0.11);
}

/* Editorial Gallery grid. */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 68px;
    gap: 24px;
    grid-auto-flow: dense;
}

/* Individual Gallery item. */
.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(16, 19, 29, 0.07);
    background-color: var(--white);
    box-shadow: var(--shadow-card);
    text-align: left;
    transition:
        opacity 0.45s ease,
        transform 0.55s var(--transition-easing),
        box-shadow 0.55s ease;
}

/* Standard square-style Gallery item. */
.gallery-item-standard {
    grid-column: span 4;
    grid-row: span 6;
}

/* Tall portrait Gallery item. */
.gallery-item-tall {
    grid-column: span 4;
    grid-row: span 9;
}

/* Wide landscape Gallery item. */
.gallery-item-wide {
    grid-column: span 8;
    grid-row: span 6;
}

/* Gallery item hover. */
.gallery-item:hover {
    box-shadow: 0 36px 80px rgba(16, 19, 29, 0.16);
    transform: translateY(-7px);
}

/* Hidden filter state. */
.gallery-item.is-hidden {
    display: none;
}

/* Gallery placeholder. */
.gallery-placeholder {
    width: 100%;
    height: 100%;
    transition:
        transform 0.85s var(--transition-easing),
        filter 0.65s ease;
}

/* Creates different opaline tones across the grid. */
.gallery-item:nth-child(4n + 1) .gallery-placeholder {
    background:
        linear-gradient(
            145deg,
            rgba(169, 217, 234, 0.46),
            rgba(255, 255, 255, 0.96) 50%,
            rgba(239, 170, 138, 0.24)
        );
}

.gallery-item:nth-child(4n + 2) .gallery-placeholder {
    background:
        linear-gradient(
            145deg,
            rgba(200, 183, 229, 0.46),
            rgba(255, 255, 255, 0.96) 48%,
            rgba(169, 217, 234, 0.22)
        );
}

.gallery-item:nth-child(4n + 3) .gallery-placeholder {
    background:
        linear-gradient(
            145deg,
            rgba(239, 170, 138, 0.34),
            rgba(255, 255, 255, 0.97) 50%,
            rgba(216, 179, 108, 0.2)
        );
}

.gallery-item:nth-child(4n + 4) .gallery-placeholder {
    background:
        linear-gradient(
            145deg,
            rgba(191, 229, 223, 0.4),
            rgba(255, 255, 255, 0.97) 50%,
            rgba(200, 183, 229, 0.22)
        );
}

/* Real Gallery image. */
.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 0.85s var(--transition-easing),
        filter 0.65s ease;
}

/* Enlarges the image subtly on hover. */
.gallery-item:hover .gallery-placeholder,
.gallery-item:hover .gallery-image {
    filter: saturate(1.05) contrast(1.02);
    transform: scale(1.035);
}

/* Gallery text overlay. */
.gallery-item-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px 18px;
    padding: 56px 26px 24px;
    color: var(--white);
    background:
        linear-gradient(
            to top,
            rgba(16, 19, 29, 0.88),
            rgba(16, 19, 29, 0.15) 72%,
            transparent
        );
    transform: translateY(18px);
    transition:
        transform 0.55s var(--transition-easing),
        background 0.45s ease;
}

/* Gallery category. */
.gallery-item-overlay small {
    grid-column: 1;
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--opal-peach);
    text-transform: uppercase;
}

/* Gallery title. */
.gallery-item-overlay strong {
    grid-column: 1;
    font-family: var(--heading-font);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1;
}

/* Expand icon. */
.gallery-item-overlay i {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    font-size: 1.05rem;
}

/* Reveals the full overlay on hover. */
.gallery-item:hover .gallery-item-overlay {
    background:
        linear-gradient(
            to top,
            rgba(16, 19, 29, 0.94),
            rgba(16, 19, 29, 0.18) 76%,
            transparent
        );
    transform: translateY(0);
}

/* Empty filter message. */
.gallery-empty-message {
    padding: 55px 0;
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--ink-muted);
    text-align: center;
}

/*
    SOCIAL STRIP
*/

/* Light opaline Instagram callout. */
.gallery-social-strip {
    position: relative;
    isolation: isolate;

    padding:
        94px
        var(--page-padding);

    color: var(--ink);

    background:
        radial-gradient(
            circle at 8% 18%,
            rgba(169, 217, 234, 0.48),
            transparent 25%
        ),
        radial-gradient(
            circle at 78% 22%,
            rgba(200, 183, 229, 0.3),
            transparent 27%
        ),
        radial-gradient(
            circle at 94% 88%,
            rgba(239, 170, 138, 0.25),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #f8fcfc 0%,
            #f5f1f7 52%,
            #faefeb 100%
        );

    overflow: hidden;
}

/* Large editorial background word. */
.gallery-social-strip::before {
    content: "SOCIAL";

    position: absolute;
    right: -1vw;
    bottom: -38px;
    z-index: -1;

    font-family: var(--heading-font);
    font-size: clamp(8rem, 15vw, 17rem);
    font-weight: 600;
    line-height: 0.7;
    letter-spacing: -0.06em;
    color: rgba(16, 19, 29, 0.028);

    pointer-events: none;
}

/* Adds a soft reflective light across the section. */
.gallery-social-strip::after {
    content: "";

    position: absolute;
    top: -80%;
    left: 30%;
    z-index: -1;

    width: 240px;
    height: 250%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.52),
            transparent
        );

    opacity: 0.6;
    transform: rotate(22deg);

    pointer-events: none;
}

/* Social strip layout. */
.gallery-social-strip-layout {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: clamp(32px, 5vw, 70px);
}

/* Instagram icon container. */
.gallery-social-strip-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 112px;
    height: 112px;

    border: 1px solid rgba(16, 19, 29, 0.1);
    border-radius: 50%;

    font-size: 2.15rem;
    color: var(--ink);

    background:
        linear-gradient(
            145deg,
            rgba(169, 217, 234, 0.9),
            rgba(255, 255, 255, 0.96) 40%,
            rgba(200, 183, 229, 0.72) 70%,
            rgba(239, 170, 138, 0.62)
        );

    box-shadow:
        0 24px 58px rgba(16, 19, 29, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);

    transition:
        transform 0.55s var(--transition-easing),
        box-shadow 0.55s ease;
}

/* Adds a subtle interaction to the Instagram icon. */
.gallery-social-strip:hover
.gallery-social-strip-icon {
    box-shadow:
        0 30px 70px rgba(16, 19, 29, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);

    transform:
        translateY(-5px)
        rotate(-4deg);
}

/* Social strip label. */
.gallery-social-strip-copy > span {
    display: block;

    margin-bottom: 11px;

    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--rosewood);

    text-transform: uppercase;
}

/* Social strip heading. */
.gallery-social-strip h2 {
    max-width: 920px;

    font-family: var(--heading-font);
    font-size: clamp(3.2rem, 4.5vw, 5.2rem);
    font-weight: 500;
    line-height: 0.92;
    letter-spacing: -0.035em;
    color: var(--ink);
}

/* Instagram profile button. */
.gallery-social-strip .outline-button {
    min-width: 215px;

    border-color: rgba(16, 19, 29, 0.16);

    color: var(--ink);

    background:
        rgba(255, 255, 255, 0.5);

    box-shadow:
        0 14px 32px rgba(16, 19, 29, 0.07);

    backdrop-filter: blur(12px);
}

/* Instagram profile button hover. */
.gallery-social-strip .outline-button:hover {
    border-color: var(--ink);

    color: var(--white);

    background:
        linear-gradient(
            145deg,
            #293048,
            var(--ink)
        );

    box-shadow:
        0 18px 38px rgba(16, 19, 29, 0.17);
}

/*
    LIGHTBOX
*/

/* Full-screen Gallery lightbox. */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    place-items: center;
    padding: 28px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

/* Open lightbox state. */
.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}

/* Dark clickable background. */
.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(8, 10, 17, 0.86);
    backdrop-filter: blur(14px);
}

/* Main lightbox panel. */
.gallery-lightbox-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 1080px);
    max-height: calc(100vh - 56px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--white);
    background:
        linear-gradient(
            145deg,
            #262d40,
            var(--ink)
        );
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.48);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s var(--transition-easing);
}

/* Final panel position. */
.gallery-lightbox.open .gallery-lightbox-panel {
    transform: translateY(0) scale(1);
}

/* Lightbox media area. */
.gallery-lightbox-media {
    position: relative;
    min-height: min(68vh, 720px);
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(169, 217, 234, 0.2),
            rgba(255, 255, 255, 0.08),
            rgba(200, 183, 229, 0.2)
        );
}

/* Lightbox image. */
.gallery-lightbox-image {
    width: 100%;
    height: min(68vh, 720px);
    object-fit: contain;
    background-color: #0c0f17;
}

/* Lightbox fallback placeholder. */
.gallery-lightbox-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: min(68vh, 720px);
    font-family: var(--heading-font);
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Placeholder icon. */
.gallery-lightbox-placeholder i {
    font-size: 2.4rem;
    color: var(--opal-peach);
}

/* Lightbox caption. */
.gallery-lightbox-caption {
    padding: 28px 34px 32px;
}

/* Lightbox category. */
.gallery-lightbox-caption > span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--opal-peach);
    text-transform: uppercase;
}

/* Lightbox title. */
.gallery-lightbox-caption h2 {
    margin-bottom: 9px;
    font-family: var(--heading-font);
    font-size: 2.7rem;
    font-weight: 500;
    line-height: 1;
}

/* Lightbox description. */
.gallery-lightbox-caption p {
    max-width: 720px;
    font-size: 0.88rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.68);
}

/* Shared lightbox control. */
.gallery-lightbox-close,
.gallery-lightbox-navigation {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: var(--white);
    background-color: rgba(16, 19, 29, 0.55);
    backdrop-filter: blur(10px);
}

/* Lightbox close button. */
.gallery-lightbox-close {
    top: 18px;
    right: 18px;
}

/* Previous image control. */
.gallery-lightbox-previous {
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
}

/* Next image control. */
.gallery-lightbox-next {
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
}

/* Lightbox control hover. */
.gallery-lightbox-close:hover,
.gallery-lightbox-navigation:hover {
    border-color: transparent;
    color: var(--ink);
    background: var(--opal-gradient);
}

/* Prevents page scrolling while the lightbox is open. */
body.lightbox-open {
    overflow: hidden;
}

/*
    RESPONSIVE DESIGN
*/

@media (max-width: 1199.98px) {

    /* Adds room for the fixed mobile header. */
    .gallery-hero {
        padding-top: 86px;
    }
}

@media (max-width: 991.98px) {

    /* Stacks the Gallery Hero. */
    .gallery-hero-layout {
        grid-template-columns: 1fr;
        gap: 55px;
        min-height: auto;
        padding-top: 105px;
        padding-bottom: 90px;
    }

    /* Centres Gallery Hero text. */
    .gallery-hero-copy {
        max-width: 820px;
        margin: 0 auto;
        text-align: center;
    }

    /* Removes the desktop vertical line. */
    .gallery-hero-copy::before {
        display: none;
    }

    /* Centres the Gallery Hero label. */
    .gallery-hero-copy .section-label {
        justify-content: center;
    }

    /* Centres the Gallery Hero introduction. */
    .gallery-hero-copy > p {
        margin-right: auto;
        margin-left: auto;
    }

    /* Centres the Gallery Hero actions. */
    .gallery-hero-actions {
        justify-content: center;
    }

    /* Resizes Gallery Hero visual. */
    .gallery-hero-visual {
        width: min(100%, 760px);
        min-height: 720px;
        margin: 0 auto;
    }

    /* Stacks the Gallery collection heading. */
    .gallery-collection-heading {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* Expands the Gallery introduction. */
    .gallery-collection-heading > p {
        max-width: 720px;
    }

    /* Changes the Gallery grid to six columns. */
    .gallery-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    /* Adjusts standard Gallery items. */
    .gallery-item-standard {
        grid-column: span 3;
    }

    /* Adjusts tall Gallery items. */
    .gallery-item-tall {
        grid-column: span 3;
    }

    /* Adjusts wide Gallery items. */
    .gallery-item-wide {
        grid-column: span 6;
    }

    /* Stacks the Instagram strip on tablets. */
    .gallery-social-strip-layout {
        grid-template-columns:
            auto
            1fr;
    }

    /* Places the Instagram button below the copy. */
    .gallery-social-strip .outline-button {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 767.98px) {

    /*
        GALLERY HERO
    */

    /* Reduces Gallery Hero spacing. */
    .gallery-hero-layout {
        padding-top: 78px;
        padding-bottom: 70px;
    }

    /* Reduces Gallery Hero heading. */
    .gallery-hero-copy h1 {
        font-size: clamp(4.2rem, 17vw, 6.2rem);
    }

    /* Stacks Gallery Hero actions vertically. */
    .gallery-hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
    }

    /* Makes the main Hero button full-width. */
    .gallery-hero-actions .primary-button {
        width: 100%;
    }

    /* Centres the secondary editorial link. */
    .gallery-hero-actions .editorial-link {
        justify-content: center;
    }

    /* Reduces Gallery Hero visual height. */
    .gallery-hero-visual {
        min-height: 600px;
    }

    /* Resizes the main Gallery Hero frame. */
    .gallery-hero-main-frame {
        width: min(80%, 500px);

        border-radius:
            190px
            190px
            10px
            10px;
    }

    /* Matches the main placeholder and image shape. */
    .gallery-hero-placeholder,
    .gallery-hero-image {
        border-radius:
            180px
            180px
            5px
            5px;
    }

    /* Resizes and repositions the supporting frame. */
    .gallery-hero-secondary-frame {
        right: 1%;

        width: min(34%, 190px);
    }

    /* Repositions the editorial note card. */
    .gallery-hero-note {
        left: 1%;
        bottom: 4%;
    }

    /* Hides the vertical decorative text. */
    .gallery-hero-vertical-text {
        display: none;
    }

    /*
        GALLERY FILTERS
    */

    /* Makes the filter bar horizontally scrollable. */
    .gallery-filter-bar {
        flex-wrap: nowrap;

        overflow-x: auto;
        overflow-y: hidden;

        padding-bottom: 18px;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    /* Hides the filter scrollbar in WebKit browsers. */
    .gallery-filter-bar::-webkit-scrollbar {
        display: none;
    }

    /* Prevents filter buttons from shrinking. */
    .gallery-filter-button {
        flex: 0 0 auto;
    }

    /*
        GALLERY GRID
    */

    /* Displays one Gallery item per row. */
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;

        gap: 22px;
    }

    /* Resets all Gallery item grid spans. */
    .gallery-item-standard,
    .gallery-item-tall,
    .gallery-item-wide {
        grid-column: 1;
        grid-row: auto;

        min-height: 420px;
    }

    /*
        INSTAGRAM SOCIAL STRIP
    */

    /* Reduces the Instagram strip spacing. */
    .gallery-social-strip {
        padding-top: 72px;
        padding-bottom: 72px;
    }

    /* Stacks and centres the Instagram content. */
    .gallery-social-strip-layout {
        grid-template-columns: 1fr;

        gap: 28px;

        text-align: center;
    }

    /* Centres and reduces the Instagram icon. */
    .gallery-social-strip-icon {
        width: 92px;
        height: 92px;

        margin: 0 auto;

        font-size: 1.8rem;
    }

    /* Reduces the Instagram heading. */
    .gallery-social-strip h2 {
        max-width: 620px;

        margin-right: auto;
        margin-left: auto;

        font-size: clamp(3rem, 13vw, 4.5rem);
    }

    /* Makes the Instagram button full-width. */
    .gallery-social-strip .outline-button {
        grid-column: auto;

        width: 100%;
        min-width: 0;

        justify-self: stretch;
    }

    /*
        LIGHTBOX
    */

    /* Reduces the space around the lightbox. */
    .gallery-lightbox {
        padding: 14px;
    }

    /* Reduces the lightbox media height. */
    .gallery-lightbox-media,
    .gallery-lightbox-image,
    .gallery-lightbox-placeholder {
        min-height: 58vh;
        height: 58vh;
    }

    /* Moves the lightbox navigation controls lower. */
    .gallery-lightbox-previous,
    .gallery-lightbox-next {
        top: auto;
        bottom: 112px;

        transform: none;
    }

    /* Reduces the lightbox caption spacing. */
    .gallery-lightbox-caption {
        padding:
            25px
            24px
            28px;
    }

    /* Reduces the lightbox title. */
    .gallery-lightbox-caption h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 479.98px) {

    /* Reduces Gallery Hero visual height. */
    .gallery-hero-visual {
        min-height: 520px;
    }

    /* Makes the main frame wider. */
    .gallery-hero-main-frame {
        width: 88%;
    }

    /* Hides the smaller Hero frame on very small screens. */
    .gallery-hero-secondary-frame {
        display: none;
    }

    /* Reduces Gallery item height. */
    .gallery-item-standard,
    .gallery-item-tall,
    .gallery-item-wide {
        min-height: 360px;
    }

    /* Reduces Gallery overlay title. */
    .gallery-item-overlay strong {
        font-size: 1.65rem;
    }

    /* Reduces lightbox navigation controls. */
    .gallery-lightbox-navigation {
        width: 42px;
        height: 42px;
    }
}
