/* ═══════════════════════════════════════════════════════════
 *  Story — Stage panels, 3D card flip, story theater, marquee, curtains, beats
 *  @module wp-story.css
 * ═══════════════════════════════════════════════════════════ */

/* ── Stage Panel Placeholders (Phase 2) ── */

.wedding-portal__stage-panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 55;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.wedding-portal__stage-inner {
    text-align: center;
    padding: 2.4rem 3rem;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 380px;
    width: 80vw;
}

.wedding-portal__stage-kicker {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.6rem;
    font-weight: 400;
}

.wedding-portal__stage-title {
    font-family: inherit;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.wedding-portal__stage-copy {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.36);
    margin: 0;
    font-weight: 300;
}

@media (max-width: 767px) {
    .wedding-portal__stage-inner {
        padding: 1.8rem 2rem;
        max-width: 300px;
    }

    .wedding-portal__stage-title {
        font-size: 1.3rem;
    }
}

/* ── 3D Card Flip (Phase 3) ── */

.wedding-portal__invitation {
    perspective: 1200px;
}

.wedding-portal__card-shell {
    transform-style: preserve-3d;
}

.wedding-portal__card-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.wedding-portal__card-face--story {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    perspective: 8000px;
    transform-style: preserve-3d;
}

.wedding-portal__story-about-shell {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: center center;
    will-change: transform;
}

.wedding-portal__story-side {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    transform-origin: center center;
    will-change: transform;
}

.wedding-portal__story-side--story {
    transform: rotateY(0deg) translateZ(1px);
}

.wedding-portal__story-side--about {
    transform: rotateY(180deg) translateZ(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 242, 233, 0.96)),
        radial-gradient(circle at 82% 82%, rgba(219, 196, 160, 0.18), transparent 26%);
    color: #2b241d;
    padding: 7.5% 8.5%;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

.wedding-portal__story-side--about.wedding-portal__story-side--about-glass {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(239, 235, 228, 0.14)),
        radial-gradient(circle at 82% 82%, rgba(219, 196, 160, 0.14), transparent 26%);
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(22px) saturate(118%);
    -webkit-backdrop-filter: blur(22px) saturate(118%);
}

.wedding-portal__story-inner {
    --story-curtain-open: 0;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    color: rgba(255, 246, 229, 0.92);
    text-align: left;
    background: transparent;
}

.wedding-portal__story-frame-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
    z-index: 2;
}

.wedding-portal__story-marquee,
.wedding-portal__story-proscenium,
.wedding-portal__story-strip {
    position: relative;
    width: auto;
    margin: 0;
}

.wedding-portal__story-marquee,
.wedding-portal__story-strip {
    z-index: 3;
}

.wedding-portal__story-proscenium {
    z-index: 1;
}

.wedding-portal__story-marquee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: absolute;
    top: 2.8%;
    left: 50%;
    width: 30%;
    min-width: 240px;
    transform: translateX(-50%);
    padding-inline: 0;
}

.wedding-portal__story-presented-by {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #2d251e;
}

.wedding-portal__story-presented-seal {
    position: absolute;
    top: -14px;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translateX(-50%);
    z-index: 2;
}

.wedding-portal__story-presented-seal img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wedding-portal__story-presented-arc {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.wedding-portal__story-presented-arc-text {
    fill: #2d251e;
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wedding-portal__story-presented-arc-text--title {
    transform: translateY(5px);
    transform-origin: center center;
}

.wedding-portal__story-presented-arc-text--subtitle {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.wedding-portal__story-proscenium {
    position: absolute;
    left: 11.2%;
    right: 11.2%;
    top: 18.3%;
    bottom: 24.9%;
    min-height: 0;
    border-radius: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.wedding-portal__story-stage-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 26%, rgba(255, 226, 168, 0.18), transparent 28%),
        radial-gradient(circle at 50% 82%, rgba(249, 191, 112, 0.08), transparent 34%);
    opacity: 0.9;
    pointer-events: none;
}

.wedding-portal__story-stage {
    position: absolute;
    inset: 0;
    border-radius: 0;
    overflow: hidden;
    transform: none;
    background: transparent;
}

.wedding-portal__story-curtain {
    position: absolute;
    top: -2%;
    bottom: -2%;
    width: 52%;
    z-index: 0;
    overflow: hidden;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: inset -18px 0 24px rgba(26, 4, 7, 0.34);
}

.wedding-portal__story-curtain--left {
    left: 0;
    transform-origin: left center;
    border-right: 1px solid rgba(255, 214, 170, 0.12);
}

.wedding-portal__story-curtain--right {
    right: 0;
    transform-origin: right center;
    border-left: 1px solid rgba(255, 214, 170, 0.12);
}

.wedding-portal__story-curtain-trim {
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 14px;
    background: linear-gradient(180deg, rgba(249, 214, 166, 0.66), rgba(198, 136, 70, 0.08));
}

.wedding-portal__story-beat {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform-origin: center center;
}

.wedding-portal__story-beat.is-active {
    opacity: 1;
    z-index: 2;
}

.wedding-portal__story-beat--has-image .wedding-portal__story-beat-wash,
.wedding-portal__story-beat--has-image .wedding-portal__story-beat-halo,
.wedding-portal__story-beat--has-image .wedding-portal__story-beat-floor {
    display: none;
}

.wedding-portal__story-beat-wash,
.wedding-portal__story-beat-halo,
.wedding-portal__story-beat-floor,
.wedding-portal__story-tableau {
    position: absolute;
}

.wedding-portal__story-beat-wash {
    inset: 0;
    background:
        radial-gradient(circle at 50% 24%, rgba(255, 228, 173, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(42, 30, 22, 0.24), rgba(18, 12, 11, 0.52));
}

.wedding-portal__story-beat-halo {
    left: 50%;
    top: 18%;
    width: 42%;
    height: 42%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 228, 175, 0.34), rgba(255, 228, 175, 0) 68%);
    filter: blur(10px);
    opacity: 0.54;
}

.wedding-portal__story-beat-floor {
    left: 14%;
    right: 14%;
    bottom: 11%;
    height: 17%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(245, 202, 136, 0.24), rgba(22, 15, 12, 0) 72%);
    filter: blur(12px);
}

.wedding-portal__story-tableau {
    inset: 0;
}

.wedding-portal__story-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: transparent;
}

.wedding-portal__story-media-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transform: scale(1.04);
    transform-origin: center center;
    filter: saturate(0.92) contrast(1.04) brightness(0.88);
}

.wedding-portal__story-cutout,
.wedding-portal__story-arch,
.wedding-portal__story-aisle,
.wedding-portal__story-tripod,
.wedding-portal__story-ribbon,
.wedding-portal__story-ring-glow,
.wedding-portal__story-halo-heart {
    position: absolute;
}

.wedding-portal__story-cutout {
    bottom: 19%;
    width: 58px;
    height: 126px;
    border-radius: 28px 28px 18px 18px;
    background: linear-gradient(180deg, rgba(45, 33, 25, 0.94), rgba(18, 13, 11, 0.98));
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.26);
}

.wedding-portal__story-cutout::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -30px;
    width: 42px;
    height: 42px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(68, 52, 39, 0.96), rgba(24, 18, 15, 0.98));
}

.wedding-portal__story-cutout::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 76%;
    height: 22%;
    transform: translateX(-50%);
    border-radius: 16px;
    background: rgba(14, 11, 10, 0.82);
}

.wedding-portal__story-cutout--center {
    left: 50%;
    transform: translateX(-50%);
}

.wedding-portal__story-cutout--left {
    left: 36%;
}

.wedding-portal__story-cutout--right {
    right: 34%;
}

.wedding-portal__story-cutout--guy {
    width: 60px;
    background: linear-gradient(180deg, rgba(50, 39, 33, 0.96), rgba(18, 12, 11, 1));
}

.wedding-portal__story-cutout--girl {
    width: 54px;
    height: 132px;
    border-radius: 24px 24px 16px 16px;
    background: linear-gradient(180deg, rgba(78, 57, 44, 0.96), rgba(20, 14, 12, 1));
}

.wedding-portal__story-cutout--girl::after {
    width: 108%;
    height: 28%;
    border-radius: 20px 20px 10px 10px;
}

.wedding-portal__story-cutout--kneel {
    width: 50px;
    height: 86px;
    bottom: 21%;
    transform: rotate(-18deg);
}

.wedding-portal__story-cutout--embrace-left {
    left: 44%;
    bottom: 19%;
    width: 54px;
    height: 126px;
    transform: translateX(-100%) rotate(7deg);
}

.wedding-portal__story-cutout--embrace-right {
    left: 56%;
    bottom: 19%;
    width: 54px;
    height: 130px;
    transform: rotate(-7deg);
}

.wedding-portal__story-cutout--couple-left {
    left: 41%;
    width: 52px;
    height: 120px;
}

.wedding-portal__story-cutout--couple-right {
    right: 39%;
    width: 52px;
    height: 124px;
}

.wedding-portal__story-cutout--videographer {
    left: 18%;
    width: 44px;
    height: 118px;
    background: linear-gradient(180deg, rgba(55, 44, 38, 0.96), rgba(17, 13, 12, 1));
}

.wedding-portal__story-ribbon {
    left: 34%;
    right: 34%;
    bottom: 34%;
    height: 44px;
    border-radius: 999px;
    border-top: 2px solid rgba(255, 219, 172, 0.42);
    border-bottom: 2px solid rgba(255, 219, 172, 0.08);
    transform: rotate(-10deg);
    opacity: 0.66;
}

.wedding-portal__story-ring-glow {
    left: 48%;
    bottom: 44%;
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 220, 153, 0.9);
    border-radius: 999px;
    box-shadow: 0 0 16px rgba(255, 214, 132, 0.48);
}

.wedding-portal__story-halo-heart {
    left: 50%;
    top: 24%;
    width: 54px;
    height: 48px;
    transform: translateX(-50%) rotate(-45deg);
    border-radius: 12px 12px 0 0;
    background: rgba(255, 214, 182, 0.14);
}

.wedding-portal__story-halo-heart::before,
.wedding-portal__story-halo-heart::after {
    content: '';
    position: absolute;
    width: 54px;
    height: 48px;
    border-radius: 999px 999px 0 0;
    background: rgba(255, 214, 182, 0.14);
}

.wedding-portal__story-halo-heart::before {
    left: 0;
    top: -26px;
}

.wedding-portal__story-halo-heart::after {
    left: 26px;
    top: 0;
}

.wedding-portal__story-halo-heart--finale {
    top: 20%;
    opacity: 0.82;
    filter: blur(1px);
}

.wedding-portal__story-arch {
    left: 50%;
    bottom: 22%;
    width: 186px;
    height: 170px;
    transform: translateX(-50%);
    border: 5px solid rgba(246, 208, 154, 0.32);
    border-bottom: 0;
    border-radius: 180px 180px 0 0;
}

.wedding-portal__story-aisle {
    left: 50%;
    bottom: 8%;
    width: 170px;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(243, 218, 174, 0), rgba(243, 218, 174, 0.34), rgba(243, 218, 174, 0));
}

.wedding-portal__story-tripod {
    left: 24%;
    bottom: 18%;
    width: 42px;
    height: 118px;
}

.wedding-portal__story-tripod::before,
.wedding-portal__story-tripod::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 92px;
    background: rgba(224, 196, 153, 0.36);
}

.wedding-portal__story-tripod::before {
    left: 12px;
    transform: rotate(9deg);
}

.wedding-portal__story-tripod::after {
    right: 12px;
    transform: rotate(-9deg);
}

.wedding-portal__story-tripod span {
    display: none;
}

.wedding-portal__story-end-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 238, 215, 0.84);
}

.wedding-portal__story-cutout--finale-left {
    left: 45%;
    bottom: 18%;
    width: 58px;
    height: 134px;
    transform: translateX(-100%) rotate(3deg);
}

.wedding-portal__story-cutout--finale-right {
    left: 55%;
    bottom: 18%;
    width: 58px;
    height: 136px;
    transform: rotate(-3deg);
}

.wedding-portal__story-beat--guy .wedding-portal__story-beat-wash {
    background:
        linear-gradient(180deg, rgba(43, 30, 22, 0.3), rgba(16, 11, 9, 0.68)),
        radial-gradient(circle at 52% 26%, rgba(248, 228, 176, 0.14), transparent 26%);
}

.wedding-portal__story-beat--girl .wedding-portal__story-beat-wash {
    background:
        linear-gradient(180deg, rgba(57, 34, 28, 0.28), rgba(18, 12, 10, 0.7)),
        radial-gradient(circle at 46% 24%, rgba(255, 214, 185, 0.16), transparent 30%);
}

.wedding-portal__story-beat--dance .wedding-portal__story-beat-wash,
.wedding-portal__story-beat--kiss .wedding-portal__story-beat-wash {
    background:
        linear-gradient(180deg, rgba(58, 32, 28, 0.34), rgba(15, 10, 9, 0.7)),
        radial-gradient(circle at 50% 20%, rgba(255, 218, 168, 0.18), transparent 30%);
}

.wedding-portal__story-beat--proposal .wedding-portal__story-beat-wash,
.wedding-portal__story-beat--ceremony .wedding-portal__story-beat-wash {
    background:
        linear-gradient(180deg, rgba(45, 33, 28, 0.34), rgba(13, 10, 10, 0.72)),
        radial-gradient(circle at 50% 18%, rgba(255, 227, 178, 0.2), transparent 26%);
}

.wedding-portal__story-beat--kiss_finale .wedding-portal__story-beat-wash {
    background:
        linear-gradient(180deg, rgba(60, 34, 28, 0.34), rgba(10, 7, 7, 0.78)),
        radial-gradient(circle at 50% 18%, rgba(255, 224, 186, 0.24), transparent 30%);
}

.wedding-portal__story-strip {
    position: absolute;
    left: 17.1%;
    right: 14.9%;
    bottom: 7.3%;
    height: 14.5%;
    min-height: 0;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 0;
}

.wedding-portal__story-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    text-align: center;
    transform: translateY(0);
    padding: 0 6%;
}

.wedding-portal__story-caption.is-active {
    opacity: 1;
}

.wedding-portal__story-copy {
    margin: 0;
    max-width: 100%;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.05rem, 1.65vw, 1.42rem);
    line-height: 1.08;
    letter-spacing: 0.02em;
    color: rgba(178, 140, 72, 0.96);
    text-align: center;
    text-wrap: balance;
}

