/* =============================================================
   FEATURED WORKS — dimensional gallery refinement
   Loaded after css/style.css; affects the gallery section only.
   ============================================================= */

.featured-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse 53% 49% at 51% 48%, rgba(255, 250, 237, .93), transparent 74%),
        radial-gradient(ellipse 33% 61% at -4% 58%, rgba(102, 73, 44, .17), transparent 76%),
        radial-gradient(ellipse 35% 59% at 105% 45%, rgba(104, 74, 42, .16), transparent 75%),
        linear-gradient(105deg, #d8cbb6 0%, #eee6da 47%, #ded1be 100%);
}

.featured-section::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    opacity: .52;
    background:
        linear-gradient(115deg, transparent 0 67%, rgba(255, 252, 239, .22) 79%, transparent 94%),
        radial-gradient(ellipse at 50% 98%, rgba(143, 94, 48, .12), transparent 45%);
}

.featured-section .section-container {
    position: relative;
    z-index: 1;
    padding-top: clamp(70px, 8vw, 116px);
    padding-bottom: clamp(50px, 6vw, 82px);
}

.featured-section .section-heading {
    width: min(1170px, calc(100% - 116px));
    max-width: none;
    margin: 0 auto clamp(38px, 4.4vw, 66px);
    text-align: left;
}

.featured-section .section-heading h2 {
    margin: 0 0 18px;
    color: #181614;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 5.45vw, 78px);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: .96;
}

.gallery-eyebrow {
    margin: 0 0 24px;
    color: #1d1a17;
    font-size: 11px;
    letter-spacing: .48em;
    line-height: 1;
}

.gallery-description {
    max-width: 470px;
    margin: 0;
    color: #514b44;
    font-size: 15px;
    line-height: 1.7;
}

.gallery-shelf-frame {
    position: relative;
    isolation: isolate;
    width: min(1170px, calc(100% - 116px));
    margin: 0 auto;
    padding: 0 8px 67px;
    overflow: visible;
}

/* The original stylesheet used older shelf layers.  Remove them so this
   refinement renders one physical ledge instead of two stacked beams. */
.gallery-shelf-frame::before,
.featured-grid::before,
.featured-grid::after {
    content: none !important;
    display: none !important;
}

/* Keep the carousel compact enough for four featured works to read as a set. */
.featured-grid {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    gap: 30px;
    width: 100%;
    margin: 0;
    padding: 12px 12px 30px;
    overflow-x: auto;
    overflow-y: clip;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
}

.featured-grid::-webkit-scrollbar {
    display: none;
}

.featured-grid .artwork-card {
    position: relative;
    z-index: 5;
    flex: 0 0 260px;
    width: 260px;
    min-width: 260px;
    margin: 0;
    /* Image and caption carry the rounded edges; the card stays open so its
       individual cast shadow can fall naturally on the shelf. */
    overflow: visible;
    scroll-snap-align: start;
    border: 1px solid rgba(74, 55, 36, .15);
    border-radius: 14px;
    background: #efe4d3;
    box-shadow: none;
    transform: translate3d(0, 0, 0);
    transition: transform 260ms ease;
    will-change: transform;
}

.featured-grid .artwork-card::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: 13%;
    bottom: -27px;
    left: 13%;
    height: 17px;
    border-radius: 50%;
    background: rgba(50, 28, 13, .38);
    filter: blur(7px);
    opacity: .46;
    pointer-events: none;
    transition: transform 260ms ease, opacity 260ms ease;
}

.featured-grid .artwork-card:hover,
.featured-grid .artwork-card:focus-within {
    z-index: 7;
    transform: translateY(-9px);
    box-shadow: none;
}

.featured-grid .artwork-card:hover::after,
.featured-grid .artwork-card:focus-within::after {
    opacity: .65;
    transform: translateY(9px) scaleX(.94);
}

.featured-grid .artwork-image {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 1 / .96;
    overflow: hidden;
    border-radius: 13px 13px 0 0;
    background: #d8cab8;
}

.featured-grid .artwork-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 360ms ease;
}

.featured-grid .artwork-card:hover .artwork-image img,
.featured-grid .artwork-card:focus-within .artwork-image img {
    transform: none;
}

/* A transformed desktop card must not make the browser re-snap the carousel.
   Otherwise the first card shifts sideways and its left shadow gets clipped. */
@media (hover: hover) {
    .featured-grid {
        overflow-anchor: none;
        scroll-snap-type: none;
    }

    .featured-grid .artwork-card {
        scroll-snap-align: none;
    }
}

.featured-grid .artwork-info {
    position: relative;
    z-index: 1;
    min-height: 107px;
    padding: 18px 19px 17px;
    background: linear-gradient(135deg, #f2e8d9, #e9ddca);
    border-radius: 0 0 13px 13px;
}

.featured-grid .artwork-info h3 {
    margin: 0 0 8px;
    color: #241e19;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.15;
}

.featured-grid .artwork-info p {
    margin: 0;
    color: #4d463e;
    font-size: 11px;
    line-height: 1.45;
}

.featured-grid .artwork-info .artwork-size {
    margin-top: 3px;
}

/* A single shallow ledge: visible top plane, front edge, and a soft wall shadow. */
.gallery-shelf {
    position: absolute;
    z-index: 2;
    right: -72px;
    /* Its top meets the cards exactly, so they appear to rest on the wood. */
    bottom: 26px;
    left: -72px;
    height: 56px;
    pointer-events: none;
}

.gallery-shelf-top {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    left: 0;
    height: 24px;
    clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
    background:
        radial-gradient(ellipse 24% 140% at 18% 45%, rgba(232, 186, 125, .17), transparent 72%),
        radial-gradient(ellipse 28% 125% at 68% 58%, rgba(61, 29, 11, .18), transparent 75%),
        linear-gradient(100deg, rgba(56, 28, 12, .15), transparent 20%, rgba(226, 172, 107, .12) 44%, transparent 67%, rgba(50, 25, 10, .15)),
        linear-gradient(180deg, #ad7b4e 0%, #965e32 56%, #6d391c 100%);
    box-shadow: inset 0 1px 0 rgba(255, 235, 200, .58), inset 0 -4px 5px rgba(50, 23, 8, .25);
}

.gallery-shelf-top::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 7%;
    left: 7%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 230, 189, .25) 19%, transparent 39%, rgba(255, 230, 189, .19) 64%, transparent 88%);
    filter: blur(1px);
}

.gallery-shelf-front {
    position: absolute;
    z-index: 2;
    top: 21px;
    right: 0;
    left: 0;
    height: 28px;
    border: 1px solid rgba(67, 34, 14, .62);
    border-top: 0;
    background:
        radial-gradient(ellipse 20% 95% at 11% 50%, rgba(211, 144, 83, .13), transparent 80%),
        radial-gradient(ellipse 19% 100% at 39% 52%, rgba(45, 20, 7, .14), transparent 82%),
        radial-gradient(ellipse 25% 100% at 76% 45%, rgba(222, 157, 94, .1), transparent 80%),
        linear-gradient(93deg, rgba(44, 20, 7, .13), transparent 17%, rgba(196, 122, 66, .08) 31%, transparent 51%, rgba(43, 19, 7, .13) 69%, transparent 86%),
        linear-gradient(180deg, #814a25 0%, #693716 51%, #4c250f 100%);
    box-shadow: inset 0 2px 0 rgba(239, 181, 118, .27), inset 0 -4px 6px rgba(34, 13, 4, .28), 0 2px 1px rgba(43, 19, 7, .68);
}

.gallery-shelf-bottom {
    display: none !important;
}

.gallery-shelf::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 51px;
    right: 3%;
    left: 3%;
    height: 84px;
    background: radial-gradient(ellipse at 50% 0%, rgba(45, 33, 22, .22) 0%, rgba(45, 33, 22, .10) 42%, transparent 76%);
    filter: blur(14px);
}

/* Keep the white wall clean; the shelf uses only a restrained cast shadow. */
.gallery-shelf::before {
    display: none;
}

.gallery-shelf-frame::after {
    display: none;
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 27px;
}

.gallery-pagination button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(69, 53, 36, .31);
    transition: transform 180ms ease, background-color 180ms ease;
}

.gallery-pagination button:hover,
.gallery-pagination button:focus-visible,
.gallery-pagination button.is-active {
    background: #1c1a17;
    transform: scale(1.08);
}

.gallery-pagination button:focus-visible,
.gallery-shelf-button:focus-visible {
    outline: 2px solid #2d2219;
    outline-offset: 4px;
}

.gallery-shelf-group {
    position: relative;
    margin-top: clamp(72px, 9vw, 128px);
}

#acrylic-shelf {
    margin-top: 0;
}

.shelf-medium-heading {
    width: min(1170px, calc(100% - 116px));
    margin: 0 auto 30px;
    color: #332a20;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 3.2vw, 43px);
    font-weight: 400;
    letter-spacing: -.035em;
    line-height: 1;
}

.gallery-shelf-group .gallery-shelf-controls {
    top: 57%;
}

/* Navigation stays aligned with the gallery rather than the page edge. */
.gallery-shelf-controls {
    position: absolute;
    z-index: 10;
    top: 60%;
    right: max(28px, calc((100% - 1350px) / 2));
    left: max(28px, calc((100% - 1350px) / 2));
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-shelf-button {
    display: grid;
    width: 49px;
    height: 49px;
    place-items: center;
    border: 1px solid rgba(73, 52, 31, .18);
    border-radius: 50%;
    background: rgba(246, 239, 227, .78);
    box-shadow: 0 6px 16px rgba(57, 36, 19, .12);
    color: #30251c;
    pointer-events: auto;
    transition: transform 220ms ease, background-color 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

.gallery-shelf-button:hover:not(:disabled),
.gallery-shelf-button:focus-visible {
    color: #fff;
    background: #31231a;
    box-shadow: 0 10px 21px rgba(57, 36, 19, .2);
    transform: scale(1.06);
}

.gallery-shelf-button:focus-visible {
    outline: 2px solid #c38e59;
    outline-offset: 3px;
}

@media (max-width: 1120px) {
    .gallery-shelf-frame {
        width: min(900px, calc(100% - 72px));
    }

    .gallery-shelf {
        right: -36px;
        left: -36px;
    }

    .gallery-shelf-controls {
        right: 18px;
        left: 18px;
    }
}

@media (max-width: 700px) {
    .gallery-shelf-group {
        margin-top: 72px;
    }

    .shelf-medium-heading {
        width: calc(100% - 40px);
        margin-bottom: 24px;
        font-size: 31px;
    }

    .gallery-shelf-group .gallery-shelf-controls {
        top: 0;
        right: 20px;
        bottom: auto;
        left: auto;
        gap: 8px;
        margin: 0;
    }

    .gallery-shelf-group .gallery-shelf-button {
        width: 38px;
        height: 38px;
    }

    .gallery-shelf-group .featured-grid .artwork-card {
        flex: 0 0 calc((100% - 16px) / 2);
        width: calc((100% - 16px) / 2);
        min-width: calc((100% - 16px) / 2);
    }

    .featured-section .section-container {
        padding-top: 68px;
        padding-bottom: 51px;
    }

    .featured-section .section-heading {
        width: calc(100% - 40px);
        margin-bottom: 37px;
    }

    .featured-section .section-heading h2 {
        font-size: 47px;
    }

    .gallery-description {
        font-size: 14px;
    }

    .gallery-shelf-frame {
        width: calc(100% - 28px);
        padding: 0 0 55px;
    }

    .featured-grid {
        gap: 16px;
        padding: 10px 2px 24px;
    }

    .featured-grid .artwork-card {
        flex-basis: min(76vw, 258px);
        width: min(76vw, 258px);
        min-width: min(76vw, 258px);
    }

    .gallery-shelf {
        right: -15px;
        bottom: 10px;
        left: -15px;
        height: 43px;
    }

    .gallery-shelf-top {
        height: 17px;
    }

    .gallery-shelf-front {
        top: 15px;
        height: 21px;
    }

    .gallery-shelf::after {
        top: 24px;
        height: 42px;
    }

    .gallery-shelf::before {
        top: 31px;
        height: 70px;
        filter: blur(13px);
    }

    .gallery-shelf-controls {
        top: auto;
        right: 18px;
        bottom: 19px;
        left: auto;
        gap: 8px;
    }

    .gallery-shelf-button {
        width: 40px;
        height: 40px;
    }

    .gallery-pagination {
        gap: 15px;
        margin-top: 19px;
    }

    .gallery-pagination button {
        width: 10px;
        height: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .featured-grid .artwork-card,
    .notable-series-grid .series-card,
    .featured-grid .artwork-image img,
    .notable-series-grid .artwork-image img,
    .gallery-shelf-button {
        transition: none;
    }
}

/* =============================================================
   NOTABLE SERIES — same floating-shelf installation as Gallery
   ============================================================= */
.notable-series-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse 53% 49% at 51% 48%, rgba(255, 250, 237, .93), transparent 74%),
        radial-gradient(ellipse 33% 61% at -4% 58%, rgba(102, 73, 44, .17), transparent 76%),
        radial-gradient(ellipse 35% 59% at 105% 45%, rgba(104, 74, 42, .16), transparent 75%),
        linear-gradient(105deg, #d8cbb6 0%, #eee6da 47%, #ded1be 100%);
}

.notable-series-section .section-container {
    position: relative;
    z-index: 1;
    padding-top: clamp(70px, 8vw, 116px);
    padding-bottom: clamp(50px, 6vw, 82px);
}

/* Keep the Notable Series introduction aligned with its artwork shelf. */
.notable-series-intro {
    width: min(1170px, calc(100% - 116px));
    max-width: none;
    margin-right: auto;
    margin-left: auto;
    text-align: left;
}

.series-shelf-frame {
    position: relative;
    isolation: isolate;
    width: min(1170px, calc(100% - 116px));
    margin: 0 auto;
    padding: 12px 8px 67px;
    overflow: visible;
}

.series-shelf-frame::before,
.series-shelf-frame::after {
    content: none !important;
    display: none !important;
}

.notable-series-grid {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0 0 30px;
    overflow: visible;
}

.notable-series-grid .series-card {
    position: relative;
    z-index: 5;
    min-width: 0;
    margin: 0;
    overflow: visible;
    border: 1px solid rgba(74, 55, 36, .15);
    border-radius: 14px;
    background: #efe4d3;
    box-shadow: none;
    cursor: pointer;
    transform: translate3d(0, 0, 0);
    transition: transform 260ms ease;
    will-change: transform;
}

.notable-series-grid .series-card::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: 13%;
    bottom: -27px;
    left: 13%;
    height: 17px;
    border-radius: 50%;
    background: rgba(50, 28, 13, .38);
    filter: blur(7px);
    opacity: .46;
    pointer-events: none;
    transition: transform 260ms ease, opacity 260ms ease;
}

.notable-series-grid .series-card:hover,
.notable-series-grid .series-card:focus-within {
    z-index: 7;
    outline: none;
    box-shadow: none;
    transform: translateY(-9px);
}

.notable-series-grid .series-card:hover::after,
.notable-series-grid .series-card:focus-within::after {
    opacity: .65;
    transform: translateY(9px) scaleX(.94);
}

.notable-series-grid .artwork-image {
    position: relative;
    z-index: 1;
    aspect-ratio: 1 / .96;
    overflow: hidden;
    border-radius: 13px 13px 0 0;
    background: #d8cab8;
}

.notable-series-grid .artwork-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
    transition: none;
}

.notable-series-grid .series-card:hover .artwork-image img,
.notable-series-grid .series-card:focus-within .artwork-image img {
    transform: none;
}

.notable-series-grid .artwork-info {
    position: relative;
    z-index: 1;
    min-height: 107px;
    padding: 18px 19px 17px;
    border-radius: 0 0 13px 13px;
    background: linear-gradient(135deg, #f2e8d9, #e9ddca);
}

.notable-series-grid .artwork-info h3 {
    margin: 0 0 8px;
    color: #241e19;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.15;
}

.notable-series-grid .artwork-info p {
    margin: 0;
    color: #4d463e;
    font-size: 11px;
    line-height: 1.45;
}

/* Desktop cards lean gently toward the center, with a slim painted edge to
   give each work the physical depth of a framed canvas. */
@media (min-width: 1025px) {
    .featured-grid,
    .notable-series-grid {
        gap: 46px;
        perspective: 1500px;
    }

    .featured-grid {
        box-sizing: border-box;
        padding-right: 0;
        padding-left: 0;
    }

    .featured-grid .artwork-card {
        flex: 0 0 calc((100% - 182px) / 4);
        width: calc((100% - 182px) / 4);
        min-width: calc((100% - 182px) / 4);
    }

    .featured-grid .artwork-card:first-child {
        margin-left: 32px;
    }

    .featured-grid .artwork-card,
    .notable-series-grid .series-card {
        --card-angle: 8deg;
        box-shadow: -9px 8px 18px rgba(47, 35, 24, .23);
        transform: rotateY(var(--card-angle));
        transform-origin: center bottom;
        transform-style: preserve-3d;
    }

    .featured-grid .artwork-card:hover,
    .featured-grid .artwork-card:focus-within,
    .notable-series-grid .series-card:hover,
    .notable-series-grid .series-card:focus-within {
        box-shadow: -12px 13px 24px rgba(47, 35, 24, .28);
        transform: translateY(-9px) rotateY(var(--card-angle));
    }
}

.series-shelf-controls {
    display: none;
}

.series-navigation-row,
.series-pagination {
    display: none;
}

.gallery-inquiry-button,
.series-inquiry-button {
    display: flex;
    width: max-content;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    min-width: 220px;
    margin: 28px auto 0;
    padding: 15px 19px;
    border: 1px solid rgba(35, 29, 24, .66);
    background: #211e1a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background-color 180ms ease, transform 180ms ease;
}

.gallery-inquiry-button:hover,
.gallery-inquiry-button:focus-visible,
.series-inquiry-button:hover,
.series-inquiry-button:focus-visible {
    background: #5e412a;
    transform: translateY(-2px);
}

.gallery-inquiry-button {
    margin-top: 46px;
}

@media (max-width: 1024px) {
    .featured-grid,
    .notable-series-grid {
        perspective: 1200px;
    }

    .featured-grid .artwork-card,
    .notable-series-grid .series-card {
        --card-angle: 5deg;
        box-shadow: -7px 7px 15px rgba(47, 35, 24, .18);
        transform: rotateY(var(--card-angle));
        transform-style: preserve-3d;
    }

    .series-shelf-frame {
        width: min(900px, calc(100% - 72px));
    }

    .notable-series-grid {
        display: flex;
        gap: 22px;
        padding: 12px 2px 30px;
        overflow-x: auto;
        overflow-y: clip;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 2px;
        overscroll-behavior-inline: contain;
    }

    .notable-series-grid::-webkit-scrollbar {
        display: none;
    }

    .notable-series-grid .series-card {
        flex: 0 0 calc((100% - 22px) / 2);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .series-shelf-controls {
        position: relative;
        z-index: 6;
        inset: auto;
        width: max-content;
        gap: 10px;
        margin: 15px auto 0;
        display: flex;
        justify-content: center;
        pointer-events: auto;
    }

    .series-shelf-controls .gallery-shelf-button {
        pointer-events: auto;
    }

    .series-navigation-row {
        display: flex;
        width: min(900px, calc(100% - 72px));
        margin: 15px auto 0;
        justify-content: flex-end;
    }

    .series-navigation-row .series-shelf-controls {
        position: static;
        z-index: auto;
        inset: auto;
        width: max-content;
        margin: 0;
    }
}

@media (max-width: 700px) {
    .notable-series-intro {
        width: calc(100% - 40px);
    }

    .notable-series-section .section-container {
        padding-top: 68px;
        padding-bottom: 51px;
    }

    .series-shelf-frame {
        width: calc(100% - 28px);
        margin-right: auto;
        padding: 10px 0 55px;
        overflow: visible;
    }

    .notable-series-grid {
        gap: 16px;
        padding: 10px 2px 24px;
    }

    .notable-series-grid .series-card {
        flex: 0 0 calc(100% - 4px);
        width: calc(100% - 4px);
        min-width: calc(100% - 4px);
    }

    .series-navigation-row {
        display: grid;
        width: calc(100% - 28px);
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        margin-top: 17px;
    }

    .series-pagination {
        grid-column: 2;
        display: flex;
        gap: 14px;
    }

    .series-pagination button {
        width: 10px;
        height: 10px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(69, 53, 36, .31);
        transition: transform 180ms ease, background-color 180ms ease;
    }

    .series-pagination button:hover,
    .series-pagination button:focus-visible,
    .series-pagination button.is-active {
        background: #1c1a17;
        transform: scale(1.08);
    }

    .series-navigation-row .series-shelf-controls {
        grid-column: 3;
        justify-self: end;
        gap: 8px;
    }

    .series-navigation-row .gallery-shelf-button {
        width: 38px;
        height: 38px;
    }

    .gallery-inquiry-button,
    .series-inquiry-button {
        margin-top: 24px;
    }

    .gallery-inquiry-button {
        margin-top: 34px;
    }

}
