/* Gallery: six-beat editorial wedding album using final Gallery assets. */
.storybook.world-camera-ready .world-object--gallery { visibility: hidden; }

.storybook.world-camera-ready .gallery-world {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
    overflow: clip;
    color: var(--primary-ink);
    text-align: left;
    background: linear-gradient(180deg, rgba(238,236,229,.42), transparent 9% 91%, rgba(167,176,163,.16)), var(--paper-ivory);
}

.storybook.world-camera-ready .gallery-beat {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 108svh;
    display: grid;
    place-items: center;
    padding: clamp(84px,10svh,118px) max(5vw,var(--story-safe-right));
    overflow: hidden;
    background: transparent;
}

.storybook.world-camera-ready .gallery-scene {
    position: relative;
    z-index: 12;
    width: min(100%,1220px);
    min-height: min(74svh,760px);
    isolation: isolate;
}

.storybook.world-camera-ready .gallery-layer {
    transition: opacity .9s ease, transform 1.2s cubic-bezier(.22,.61,.36,1);
}

.storybook.world-camera-ready .gallery-scene.detail-reveal .gallery-layer {
    opacity: 0;
    transform: translate3d(0,24px,0) scale(.985);
}

.storybook.world-camera-ready .gallery-scene.detail-visible .gallery-layer {
    opacity: 1;
    transform: none;
}

.storybook.world-camera-ready .gallery-scene.detail-visible .gallery-layer:nth-child(2) { transition-delay: .08s; }
.storybook.world-camera-ready .gallery-scene.detail-visible .gallery-layer:nth-child(3) { transition-delay: .16s; }
.storybook.world-camera-ready .gallery-scene.detail-visible .gallery-layer:nth-child(4) { transition-delay: .24s; }
.storybook.world-camera-ready .gallery-scene.detail-visible .gallery-layer:nth-child(5) { transition-delay: .32s; }
.storybook.world-camera-ready .gallery-scene.detail-visible .gallery-layer:nth-child(6) { transition-delay: .4s; }

.storybook.world-camera-ready .gallery-eyebrow,
.storybook.world-camera-ready .gallery-index,
.storybook.world-camera-ready .gallery-copy > p,
.storybook.world-camera-ready .gallery-together__label,
.storybook.world-camera-ready .gallery-edition {
    color: var(--gold-ink,#80683f);
    font-family: var(--font-body,"Poppins",sans-serif);
    font-size: clamp(.6rem,.78vw,.72rem);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.storybook.world-camera-ready .gallery-rule {
    display: block;
    width: 74px;
    height: 1px;
    background: var(--muted-gold);
}

.storybook.world-camera-ready .gallery-media {
    position: absolute;
    box-sizing: border-box;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(181,154,98,.2);
    background: rgba(250,248,241,.98);
    box-shadow: 0 24px 54px rgba(36,51,45,.14);
}

.storybook.world-camera-ready .gallery-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.94) contrast(.99);
    transition: transform 1.6s cubic-bezier(.22,.61,.36,1);
}

.storybook.world-camera-ready .gallery-beat.world-shot-active .gallery-media img {
    transform: scale(1.018);
}

.storybook.world-camera-ready .gallery-portrait { padding: clamp(10px,1vw,14px); }
.storybook.world-camera-ready .gallery-detail { padding: clamp(6px,.65vw,9px); }

/* Beat 01: enter the album. */
.storybook.world-camera-ready .gallery-scene--intro {
    min-height: min(68svh,650px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.storybook.world-camera-ready .gallery-scene--intro::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 8% 13%;
    border: 1px solid rgba(181,154,98,.18);
    border-radius: 50%;
    transform: rotate(-6deg);
}

.storybook.world-camera-ready .gallery-scene--intro > :not(.gallery-media) {
    position: relative;
    z-index: 3;
}

.storybook.world-camera-ready .gallery-scene--intro h2 {
    margin: 18px 0 27px;
    color: var(--deep-emerald);
    font-family: var(--font-display,"Cormorant Garamond",serif);
    font-size: clamp(4.6rem,9vw,8.7rem);
    font-weight: 500;
    line-height: .76;
    letter-spacing: -.045em;
    text-transform: uppercase;
}

.storybook.world-camera-ready .gallery-scene--intro h2 span {
    display: inline-block;
    margin-left: .32em;
    font-size: .64em;
    font-style: italic;
    letter-spacing: -.025em;
    text-transform: none;
}

.storybook.world-camera-ready .gallery-scene--intro .gallery-rule { margin-bottom: 18px; }
.storybook.world-camera-ready .gallery-intro__garden { z-index: -1; left: 1%; bottom: 0; width: 20%; height: 72%; border: 0; box-shadow: none; }
.storybook.world-camera-ready .gallery-intro__garden img { opacity: .18; mask-image: linear-gradient(90deg,#000,transparent 96%); }
.storybook.world-camera-ready .gallery-intro__botanical { z-index: -1; right: 5%; top: 1%; width: 9%; height: 66%; border: 0; box-shadow: none; }
.storybook.world-camera-ready .gallery-intro__botanical img { opacity: .2; mask-image: linear-gradient(180deg,#000,transparent 96%); }

/* Beat 02: Puteri editorial spread. */
.storybook.world-camera-ready .gallery-copy { position: absolute; z-index: 9; max-width: 330px; }
.storybook.world-camera-ready .gallery-copy h3 {
    margin: 5px 0 12px;
    color: var(--deep-emerald);
    font-family: var(--font-display,"Cormorant Garamond",serif);
    font-size: clamp(4.2rem,7vw,7.4rem);
    font-weight: 500;
    line-height: .86;
}

.storybook.world-camera-ready .gallery-copy--puteri { left: 2%; top: 8%; }
.storybook.world-camera-ready .gallery-portrait--puteri-main { z-index: 4; right: 8%; top: 2%; width: 42%; height: 89%; rotate: .6deg; }
.storybook.world-camera-ready .gallery-portrait--puteri-main img { object-position: 50% 38%; }
.storybook.world-camera-ready .gallery-detail--puteri-close { z-index: 6; left: 25%; top: 30%; width: 22%; height: 39%; rotate: -1.2deg; }
.storybook.world-camera-ready .gallery-detail--puteri-close img { object-position: 50% 38%; }
.storybook.world-camera-ready .gallery-detail--puteri-bouquet { z-index: 7; left: 11%; bottom: 2%; width: 23%; height: 39%; rotate: 1deg; }
.storybook.world-camera-ready .gallery-detail--puteri-bouquet img { object-position: 50% 48%; }
.storybook.world-camera-ready .gallery-detail--puteri-fabric { z-index: 5; left: 36%; bottom: 0; width: 15%; height: 34%; rotate: -1.1deg; }
.storybook.world-camera-ready .gallery-detail--puteri-fabric img { object-position: 50% 52%; }

/* Beat 03: paper, wax seal, flowers and garden transition. */
.storybook.world-camera-ready .gallery-scene--transition { min-height: min(64svh,610px); }
.storybook.world-camera-ready .gallery-transition__garden { z-index: 1; left: 1%; top: 2%; width: 36%; height: 91%; padding: 9px; rotate: -.8deg; }
.storybook.world-camera-ready .gallery-transition__garden img { object-position: 50% 48%; }
.storybook.world-camera-ready .gallery-transition__stationery { z-index: 5; right: 17%; top: 11%; width: 31%; height: 76%; padding: 10px; rotate: 1deg; }
.storybook.world-camera-ready .gallery-transition__stationery img { object-position: 50% 50%; }
.storybook.world-camera-ready .gallery-transition__fabric { z-index: 6; left: 29%; bottom: 0; width: 15%; height: 43%; padding: 7px; rotate: -1.8deg; }
.storybook.world-camera-ready .gallery-transition__fabric img { object-position: 50% 56%; }
.storybook.world-camera-ready .gallery-transition__botanical { z-index: 7; right: 4%; bottom: 4%; width: 10%; height: 61%; border: 0; box-shadow: 0 18px 40px rgba(36,51,45,.08); }
.storybook.world-camera-ready .gallery-transition__thread {
    position: absolute;
    z-index: 4;
    left: 20%;
    right: 4%;
    top: 56%;
    height: 26%;
    border: 1px solid rgba(181,154,98,.54);
    border-left-color: transparent;
    border-radius: 50%;
    transform: rotate(-5deg);
}

/* Beat 04: Ilham, intentionally distinct from Puteri's composition. */
.storybook.world-camera-ready .gallery-copy--ilham { right: 2%; top: 7%; text-align: right; }
.storybook.world-camera-ready .gallery-portrait--ilham-main { z-index: 5; left: 7%; top: 1%; width: 41%; height: 90%; rotate: -.55deg; }
.storybook.world-camera-ready .gallery-portrait--ilham-main img { object-position: 50% 35%; }
.storybook.world-camera-ready .gallery-detail--ilham-close { z-index: 7; right: 19%; top: 29%; width: 24%; height: 44%; rotate: 1.2deg; }
.storybook.world-camera-ready .gallery-detail--ilham-close img { object-position: 50% 34%; }
.storybook.world-camera-ready .gallery-detail--ilham-garden { z-index: 2; right: 2%; bottom: 1%; width: 27%; height: 53%; rotate: -.6deg; }
.storybook.world-camera-ready .gallery-detail--ilham-garden img { opacity: .32; object-position: 50% 54%; }
.storybook.world-camera-ready .gallery-detail--ilham-botanical { z-index: 8; left: 0; bottom: -3%; width: 9%; height: 54%; border: 0; box-shadow: none; }
.storybook.world-camera-ready .gallery-detail--ilham-botanical img { opacity: .72; }

/* Beat 05: one final couple scene, preserved as a single composition. */
.storybook.world-camera-ready .gallery-scene--together { min-height: min(80svh,790px); }
.storybook.world-camera-ready .gallery-together__label {
    position: absolute;
    z-index: 9;
    left: 0;
    right: 0;
    top: 1%;
    text-align: center;
    white-space: nowrap;
}
.storybook.world-camera-ready .gallery-garden-arch {
    position: absolute;
    z-index: 1;
    left: 15%;
    right: 15%;
    top: 3%;
    height: 91%;
    border: 1px solid rgba(181,154,98,.3);
    border-bottom: 0;
    border-radius: 50% 50% 0 0;
}
.storybook.world-camera-ready .gallery-garden-path {
    position: absolute;
    z-index: 1;
    left: 42%;
    bottom: -7%;
    width: 18%;
    height: 50%;
    background: linear-gradient(90deg,transparent,rgba(181,154,98,.1) 22% 78%,transparent);
    clip-path: polygon(42% 0,58% 0,100% 100%,0 100%);
}
.storybook.world-camera-ready .gallery-couple-hero {
    z-index: 5;
    left: 50%;
    top: 8%;
    width: min(64%,720px);
    aspect-ratio: 568 / 499;
    padding: clamp(9px,.9vw,13px);
    translate: -50% 0;
}
.storybook.world-camera-ready .gallery-couple-hero img { object-position: 50% 50%; }
.storybook.world-camera-ready .gallery-couple-botanical { z-index: 7; right: 7%; bottom: -2%; width: 8%; height: 57%; border: 0; box-shadow: none; }
.storybook.world-camera-ready .gallery-couple-botanical img { opacity: .66; }

/* Beat 06: fountain-and-flowers pull-back into the next chapter. */
.storybook.world-camera-ready .gallery-scene--closing {
    min-height: min(64svh,600px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.storybook.world-camera-ready .gallery-scene--closing > :not(.gallery-media) { position: relative; z-index: 5; }
.storybook.world-camera-ready .gallery-closing__fountain { z-index: 1; left: 7%; top: 3%; width: 18%; height: 91%; border: 0; box-shadow: none; }
.storybook.world-camera-ready .gallery-closing__fountain img { opacity: .3; mask-image: linear-gradient(90deg,#000,transparent 96%); }
.storybook.world-camera-ready .gallery-closing__botanical { z-index: 1; right: 8%; top: 2%; width: 10%; height: 88%; border: 0; box-shadow: none; }
.storybook.world-camera-ready .gallery-closing__botanical img { opacity: .28; mask-image: linear-gradient(270deg,#000,transparent 96%); }
.storybook.world-camera-ready .gallery-closing__date {
    margin: 0 0 19px;
    color: var(--gold-ink,#80683f);
    font-family: var(--font-body,"Poppins",sans-serif);
    font-size: clamp(.72rem,1.2vw,.95rem);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .3em;
}
.storybook.world-camera-ready .gallery-closing__names {
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--deep-emerald);
    font-family: var(--font-display,"Cormorant Garamond",serif);
    font-size: clamp(3.6rem,7.4vw,7.2rem);
    font-weight: 500;
    line-height: .9;
    letter-spacing: .02em;
}
.storybook.world-camera-ready .gallery-closing__names .brand-ampersand { width: .68em; height: .78em; margin-inline: .12em; }

@media (max-width: 899px) {
    .storybook.world-camera-ready .gallery-beat {
        min-height: 104svh;
        padding: clamp(74px,10svh,96px) var(--story-safe-right) clamp(80px,11svh,104px) var(--story-safe-left);
    }
    .storybook.world-camera-ready .gallery-scene { min-height: 780px; }
    .storybook.world-camera-ready .gallery-scene--intro,
    .storybook.world-camera-ready .gallery-scene--transition,
    .storybook.world-camera-ready .gallery-scene--closing { min-height: 76svh; }

    .storybook.world-camera-ready .gallery-scene--intro h2 { font-size: clamp(3.55rem,18vw,5.6rem); line-height: .82; }
    .storybook.world-camera-ready .gallery-scene--intro h2 span { display: block; margin: .08em 0 0; font-size: .72em; }
    .storybook.world-camera-ready .gallery-intro__garden { left: -13%; width: 39%; height: 70%; }
    .storybook.world-camera-ready .gallery-intro__botanical { right: -4%; width: 18%; height: 60%; }

    .storybook.world-camera-ready .gallery-copy h3 { font-size: clamp(3.7rem,17vw,5.4rem); }
    .storybook.world-camera-ready .gallery-copy--puteri { left: 0; top: 0; }
    .storybook.world-camera-ready .gallery-portrait--puteri-main { right: -2%; top: 15%; width: 72%; height: 68%; }
    .storybook.world-camera-ready .gallery-detail--puteri-close { left: -2%; top: 29%; width: 36%; height: 32%; }
    .storybook.world-camera-ready .gallery-detail--puteri-bouquet { left: 3%; bottom: 1%; width: 37%; height: 29%; }
    .storybook.world-camera-ready .gallery-detail--puteri-fabric { left: auto; right: 2%; bottom: 7%; width: 20%; height: 25%; }

    .storybook.world-camera-ready .gallery-transition__garden { left: -17%; top: 9%; width: 57%; height: 75%; }
    .storybook.world-camera-ready .gallery-transition__stationery { right: -2%; top: 15%; width: 57%; height: 62%; }
    .storybook.world-camera-ready .gallery-transition__fabric { left: 29%; bottom: 1%; width: 27%; height: 36%; }
    .storybook.world-camera-ready .gallery-transition__botanical { right: 2%; bottom: 0; width: 19%; height: 49%; }
    .storybook.world-camera-ready .gallery-transition__thread { left: 1%; right: -34%; top: 57%; }

    .storybook.world-camera-ready .gallery-copy--ilham { right: 0; top: 0; }
    .storybook.world-camera-ready .gallery-portrait--ilham-main { left: -2%; top: 15%; width: 70%; height: 69%; }
    .storybook.world-camera-ready .gallery-detail--ilham-close { right: -2%; top: 29%; width: 37%; height: 34%; }
    .storybook.world-camera-ready .gallery-detail--ilham-garden { right: 4%; bottom: 0; width: 35%; height: 31%; }
    .storybook.world-camera-ready .gallery-detail--ilham-botanical { left: 1%; bottom: -3%; width: 17%; height: 43%; }

    .storybook.world-camera-ready .gallery-scene--together { min-height: 760px; }
    .storybook.world-camera-ready .gallery-together__label { top: 0; font-size: .56rem; }
    .storybook.world-camera-ready .gallery-garden-arch { left: 2%; right: 2%; top: 8%; height: 72%; }
    .storybook.world-camera-ready .gallery-couple-hero { top: 18%; width: 100%; }
    .storybook.world-camera-ready .gallery-couple-botanical { right: -2%; bottom: 12%; width: 18%; height: 36%; }
    .storybook.world-camera-ready .gallery-garden-path { left: 38%; width: 24%; }

    .storybook.world-camera-ready .gallery-closing__names { font-size: clamp(3rem,14vw,4.5rem); }
    .storybook.world-camera-ready .gallery-closing__fountain { left: -10%; top: 8%; width: 39%; height: 70%; }
    .storybook.world-camera-ready .gallery-closing__botanical { right: -4%; top: 11%; width: 28%; height: 64%; }
}

@media (min-width: 600px) and (max-width: 899px) {
    .storybook.world-camera-ready .gallery-portrait--puteri-main,
    .storybook.world-camera-ready .gallery-portrait--ilham-main { width: 66%; }
    .storybook.world-camera-ready .gallery-couple-hero { width: min(86%,650px); top: 11%; }
}

@media (max-width: 430px) and (max-height: 720px) {
    .storybook.world-camera-ready .gallery-scene { min-height: 700px; }
    .storybook.world-camera-ready .gallery-scene--intro,
    .storybook.world-camera-ready .gallery-scene--transition,
    .storybook.world-camera-ready .gallery-scene--closing { min-height: 68svh; }
    .storybook.world-camera-ready .gallery-scene--together { min-height: 680px; }
}

@media (prefers-reduced-motion: reduce) {
    .storybook.world-camera-ready .gallery-layer,
    .storybook.world-camera-ready .gallery-media img {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
