:root {
    --psr-ivory: #f4eedf;
    --psr-paper: #fbf7ec;
    --psr-parchment: #e8dcc5;
    --psr-clay: #a85f45;
    --psr-clay-dark: #78402f;
    --psr-charcoal: #252522;
    --psr-olive: #68705b;
    --psr-gold: #b58b46;
    --psr-shadow: rgba(65, 45, 31, .18);
    --psr-serif: "Italiana", "Times New Roman", serif;
    --psr-sans: "DM Sans", Arial, sans-serif;
    --psr-shadow-x: 14px;
    --psr-shadow-y: 20px;
    --psr-shadow-opacity: .2;
    --psr-scene-rx: 0deg;
    --psr-scene-ry: 0deg;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body.psr-body {
    margin: 0;
    min-width: 320px;
    color: var(--psr-charcoal);
    background: var(--psr-ivory);
    font-family: var(--psr-sans);
    line-height: 1.65;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
body.psr-locked { overflow: hidden; }
.psr-body button, .psr-body input, .psr-body textarea { font: inherit; }
.psr-body button, .psr-body a { -webkit-tap-highlight-color: transparent; }
.psr-body img { display: block; max-width: 100%; }
.psr-body address { font-style: normal; }
.psr-noise {
    position: fixed;
    z-index: 40;
    inset: 0;
    pointer-events: none;
    opacity: .13;
    background-image: url("assets/paper-grain.svg");
    mix-blend-mode: multiply;
}
.psr-main { position: relative; z-index: 2; }
.psr-sheet-section {
    position: relative;
    width: min(100%, 1440px);
    min-height: 100svh;
    margin-inline: auto;
    padding: clamp(92px, 10vw, 160px) max(24px, calc((100vw - 1180px) / 2));
    isolation: isolate;
}
.psr-sheet-section::after {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0 12px;
    pointer-events: none;
    background: linear-gradient(95deg, transparent 0 3%, rgba(121, 84, 53, .035) 3.2%, transparent 3.5% 96%, rgba(121, 84, 53, .04) 96.4%, transparent 97%);
}
.psr-eyebrow, .psr-kicker, .psr-role {
    margin: 0 0 14px;
    color: var(--psr-clay);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .22em;
    line-height: 1.4;
    text-transform: uppercase;
}
.psr-section-heading { width: min(720px, 100%); margin-bottom: clamp(42px, 6vw, 82px); }
.psr-section-heading h2, .psr-location h2, .psr-response-slip h2 {
    margin: 0;
    font-family: var(--psr-serif);
    font-size: clamp(2.45rem, 5.7vw, 5.7rem);
    font-weight: 400;
    letter-spacing: -.035em;
    line-height: .98;
}
.psr-button {
    --psr-button-shift: 0px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 52px;
    padding: 13px 20px;
    border: 1px solid var(--psr-charcoal);
    border-radius: 0;
    color: var(--psr-charcoal);
    background: transparent;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transform: translateY(var(--psr-button-shift));
    box-shadow: 0 0 0 var(--psr-charcoal);
    transition: color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}
.psr-button::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -2px;
    background: linear-gradient(110deg, transparent 18%, rgba(255,255,255,.48) 45%, transparent 72%);
    opacity: 0;
    transform: translate3d(-120%, 0, 0) skewX(-14deg);
    transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .2s ease;
}
.psr-button > span { position: relative; z-index: 1; }
.psr-button:hover::before { opacity: .58; transform: translate3d(120%, 0, 0) skewX(-14deg); }
.psr-button > span:last-child { transition: transform .3s cubic-bezier(.2,.75,.2,1); }
.psr-button:hover > span:last-child { transform: translate3d(3px, -3px, 0) rotate(6deg); }
.psr-button:hover { --psr-button-shift: -3px; color: var(--psr-paper); background: var(--psr-charcoal); box-shadow: 5px 5px 0 var(--psr-clay); }
.psr-button:active { --psr-button-shift: 1px; box-shadow: 1px 1px 0 var(--psr-clay); }
.psr-button:focus-visible, .psr-body input:focus-visible, .psr-body textarea:focus-visible, .psr-body button:focus-visible, .psr-body a:focus-visible {
    outline: 3px solid rgba(181, 139, 70, .7);
    outline-offset: 4px;
}
.psr-button-dark { color: var(--psr-paper); background: var(--psr-charcoal); }
.psr-muted, .psr-empty { color: rgba(37, 37, 34, .62); }
.psr-empty { max-width: 540px; padding: 24px; border-left: 1px solid var(--psr-clay); }

/* One composition rule for every element driven by the continuous depth engine. */
.psr-motion {
    --mx: 0px;
    --my: 0px;
    --rx: 0deg;
    --ry: 0deg;
    --scale: 1;
    --depth-x: 0px;
    --depth-y: 0px;
    --float-y: 0px;
    --psr-ambient-y: 0px;
    --psr-ambient-rz: 0deg;
    --psr-base-z: 0px;
    --psr-base-rx: 0deg;
    --psr-base-ry: 0deg;
    transform: translate3d(calc(var(--mx) + var(--depth-x)), calc(var(--my) + var(--depth-y) + var(--float-y) + var(--psr-ambient-y)), var(--psr-base-z)) rotateX(calc(var(--psr-base-rx) + var(--rx))) rotateY(calc(var(--psr-base-ry) + var(--ry))) rotateZ(var(--psr-ambient-rz)) scale(var(--scale));
    will-change: auto;
}
.psr-motion.is-in-motion { will-change: transform, opacity; }
.psr-reveal { transition: opacity .8s ease, translate .9s cubic-bezier(.2, .8, .2, 1); }
.psr-reveal:not(.psr-motion) { opacity: 0; translate: 0 34px; }
.psr-reveal:not(.psr-motion).is-visible { opacity: 1; translate: 0 0; }
.psr-motion.psr-reveal { --float-y: 30px; opacity: 0; transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.psr-motion.psr-reveal.is-visible { --float-y: 0px; opacity: 1; }

.psr-depth-stage { position: fixed; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.psr-depth-leaf { position: absolute; width: 130px; height: 260px; opacity: .18; }
.psr-depth-leaf::before, .psr-depth-leaf::after {
    content: "";
    position: absolute;
    width: 75px;
    height: 120px;
    border-radius: 100% 0 100% 0;
    background: var(--psr-clay);
    box-shadow: inset -10px -6px 16px rgba(67, 41, 31, .12), 14px 18px 28px rgba(67, 41, 31, .1);
}
.psr-depth-leaf::before { top: 10px; left: 5px; rotate: -20deg; }
.psr-depth-leaf::after { top: 105px; right: 0; rotate: 155deg; }
.psr-depth-leaf-a { top: 17%; left: -60px; }
.psr-depth-leaf-b { right: -58px; bottom: 14%; --scale: .8; }
.psr-depth-arch { right: -10vw; top: 38%; width: 28vw; height: 42vw; min-width: 250px; min-height: 370px; border: 28px solid rgba(181, 139, 70, .08); border-bottom: 0; border-radius: 50vw 50vw 0 0; }

/* Opening: a paper folio, not a story-style interface. */
.psr-opening {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    overflow: hidden;
    background: var(--psr-parchment);
    perspective: 1200px;
    transition: visibility .9s, opacity .9s;
}
.psr-opening::before, .psr-opening::after { content: ""; position: absolute; width: 34vmax; height: 68vmax; background: #d7c3a7; filter: drop-shadow(0 20px 28px rgba(55, 36, 24, .13)); }
.psr-opening::before { left: -19vmax; top: -24vmax; border-radius: 0 0 90% 0; rotate: -8deg; }
.psr-opening::after { right: -22vmax; bottom: -22vmax; border-radius: 90% 0 0; rotate: 11deg; }
.psr-opening-fold { position: absolute; z-index: 1; top: 0; width: 51%; height: 100%; background: var(--psr-ivory); box-shadow: 0 0 40px rgba(50, 34, 22, .14); transition: transform 1.15s cubic-bezier(.76, 0, .24, 1); }
.psr-opening-fold-left { left: 0; transform-origin: left center; clip-path: polygon(0 0, 100% 0, 87% 50%, 100% 100%, 0 100%); }
.psr-opening-fold-right { right: 0; transform-origin: right center; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 13% 50%); }
.psr-opening-sheet { position: relative; z-index: 2; width: min(580px, 90vw); padding: clamp(38px, 7vw, 78px); text-align: center; background: var(--psr-paper); box-shadow: 0 28px 75px rgba(67, 45, 29, .2), inset 0 0 0 1px rgba(94, 68, 47, .08); }
.psr-opening-sheet::before { content: ""; position: absolute; inset: 13px; border: 1px solid rgba(168, 95, 69, .25); pointer-events: none; }
.psr-opening-sheet h1 { margin: 0 0 10px; font-family: var(--psr-serif); font-size: clamp(2.1rem, 6vw, 4.5rem); font-weight: 400; line-height: 1.05; }
.psr-opening-sheet > p:not(.psr-eyebrow) { margin: 5px auto; font-size: .88rem; }
.psr-opening-note { max-width: 340px; color: rgba(37, 37, 34, .62); }
.psr-opening-cutout { display: flex; align-items: center; justify-content: center; gap: 13px; width: 118px; aspect-ratio: 1; margin: 18px auto 30px; border-radius: 50% 50% 8px 8px; color: var(--psr-paper); background: var(--psr-clay); box-shadow: inset 0 -12px 18px rgba(83, 39, 27, .2), 0 12px 0 #dfcfb8, 0 20px 22px rgba(61, 41, 28, .16); font-family: var(--psr-serif); font-size: 1.3rem; }
.psr-opening-cutout i { width: 1px; height: 32px; background: rgba(255,255,255,.4); rotate: 18deg; }
.psr-open-button { margin-top: 30px; }
.psr-opening.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.psr-opening.is-open .psr-opening-fold-left { transform: perspective(900px) rotateY(-82deg); }
.psr-opening.is-open .psr-opening-fold-right { transform: perspective(900px) rotateY(82deg); }
.psr-opening.is-open .psr-opening-sheet { --scale: .92; opacity: 0; }

.psr-music { position: fixed; z-index: 50; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 9px; height: 46px; padding: 7px 13px 7px 7px; border: 1px solid rgba(37, 37, 34, .2); border-radius: 30px; color: var(--psr-charcoal); background: var(--psr-paper); box-shadow: 0 10px 28px rgba(47, 36, 26, .13); cursor: pointer; }
.psr-music-disc { width: 31px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--psr-gold) 0 9%, var(--psr-paper) 10% 16%, var(--psr-charcoal) 17% 100%); animation: psr-spin 5s linear infinite; }
.psr-music[aria-pressed="false"] .psr-music-disc { animation-play-state: paused; }
.psr-music-label { font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
@keyframes psr-spin { to { rotate: 360deg; } }

/* Hero as an opened pop-up book. */
.psr-hero { display: grid; align-content: center; padding-top: max(60px, env(safe-area-inset-top)); background: var(--psr-parchment); perspective: 1500px; }
.psr-hero::before { content: ""; position: absolute; z-index: -1; inset: 9% 3%; border-radius: 50%; background: rgba(92, 65, 44, .12); filter: blur(55px); }
.psr-book { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(1160px, 94vw); min-height: min(720px, 78vh); margin: auto; filter: drop-shadow(0 38px 38px rgba(66, 46, 31, .2)); transform: rotateX(3deg); transform-style: preserve-3d; }
.psr-book-page { position: relative; overflow: hidden; padding: clamp(42px, 6vw, 92px); background: var(--psr-paper); box-shadow: inset 0 0 42px rgba(104, 77, 50, .06); }
.psr-book-page-left { display: flex; flex-direction: column; justify-content: center; border-radius: 4px 0 0 12px; clip-path: polygon(0 2%, 97% 0, 100% 50%, 97% 100%, 0 98%); }
.psr-book-page-right { display: grid; place-items: center; border-radius: 0 4px 12px 0; clip-path: polygon(3% 0, 100% 2%, 100% 98%, 3% 100%, 0 50%); }
.psr-book-spine { position: absolute; z-index: 6; top: 1%; bottom: 1%; left: 50%; width: 30px; translate: -50% 0; background: linear-gradient(90deg, transparent, rgba(72, 50, 33, .14), rgba(255,255,255,.65), rgba(72, 50, 33, .14), transparent); filter: blur(2px); pointer-events: none; }
.psr-book-page-left h2 { position: relative; z-index: 2; margin: 0; font-family: var(--psr-serif); font-size: clamp(3.6rem, 7vw, 7.4rem); font-weight: 400; letter-spacing: -.055em; line-height: .78; }
.psr-book-page-left h2 span { display: block; margin: .18em 0 .08em .65em; color: var(--psr-clay); font-size: .52em; font-style: italic; }
.psr-hero-date { margin: 30px 0 0; font-size: .82rem; font-weight: 600; letter-spacing: .24em; }
.psr-emboss { position: absolute; right: -12%; bottom: -26%; color: transparent; font-family: var(--psr-serif); font-size: 26rem; line-height: 1; text-shadow: -1px -1px 0 rgba(255,255,255,.5), 1px 1px 0 rgba(79, 55, 35, .08); }
.psr-hero-arch { position: relative; width: min(360px, 78%); aspect-ratio: .72; padding: 16px; border-radius: 190px 190px 6px 6px; background: #dfcfb7; box-shadow: 0 25px 28px rgba(64, 46, 31, .2), inset 0 0 0 1px rgba(90, 61, 39, .08); }
.psr-hero-arch::before { content: ""; position: absolute; z-index: -1; inset: -30px -36px -26px; border: 3px solid var(--psr-clay); border-bottom: 0; border-radius: 250px 250px 0 0; opacity: .45; }
.psr-hero-arch img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.psr-cover-fallback { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; color: var(--psr-paper); background: var(--psr-clay); font-family: var(--psr-serif); font-size: 3rem; }
.psr-cover-fallback span { color: var(--psr-gold); }
.psr-hero-cut-leaf { position: absolute; z-index: 2; width: 74px; height: 126px; border-radius: 100% 0 100% 0; background: var(--psr-paper); box-shadow: 9px 12px 18px rgba(58, 42, 30, .18); }
.psr-hero-cut-leaf-one { right: -39px; bottom: 20%; rotate: 29deg; }
.psr-hero-cut-leaf-two { left: -38px; top: 20%; rotate: -38deg; background: var(--psr-clay); }
.psr-hero-quote { position: absolute; right: 9%; bottom: 6%; width: 180px; margin: 0; font-family: var(--psr-serif); font-size: 1.05rem; line-height: 1.35; }
.psr-scroll-cue { display: flex; align-items: center; gap: 15px; width: max-content; margin: 32px auto 0; color: var(--psr-charcoal); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-decoration: none; text-transform: uppercase; }
.psr-scroll-cue i { display: block; width: 54px; height: 1px; background: var(--psr-charcoal); transform-origin: left; animation: psr-line 2s ease-in-out infinite; }
@keyframes psr-line { 50% { scale: .45 1; opacity: .45; } }

/* Folded countdown strip. */
.psr-countdown { min-height: 76svh; background: var(--psr-paper); }
.psr-countdown::before { content: ""; position: absolute; z-index: -1; left: 0; top: -1px; width: 100%; height: 65px; background: var(--psr-parchment); clip-path: polygon(0 0, 100% 0, 100% 25%, 92% 72%, 83% 25%, 72% 78%, 60% 25%, 48% 75%, 34% 25%, 20% 80%, 8% 25%, 0 70%); }
.psr-countdown-folds { display: grid; grid-template-columns: repeat(4, 1fr); width: min(1020px, 100%); border-block: 1px solid var(--psr-charcoal); perspective: 800px; }
.psr-count-unit { position: relative; padding: clamp(28px, 5vw, 70px) 12px; text-align: center; background: linear-gradient(105deg, rgba(0,0,0,.04), transparent 35%, rgba(255,255,255,.58) 52%, transparent 70%, rgba(0,0,0,.025)); }
.psr-count-unit:not(:last-child) { border-right: 1px dashed rgba(37,37,34,.4); }
.psr-count-unit strong { display: block; font-family: var(--psr-serif); font-size: clamp(3rem, 8vw, 7.4rem); font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.psr-count-unit span { display: block; margin-top: 12px; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; }
.psr-countdown-status { margin-top: 24px; color: var(--psr-clay); }

/* Portraits mounted on different paper-cut geometries. */
.psr-couple { overflow: hidden; background: #e7d8bf; }
.psr-couple::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 50% 110%, var(--psr-clay) 0 26%, transparent 26.3%), linear-gradient(165deg, transparent 40%, rgba(255,255,255,.26) 40.2% 61%, transparent 61.2%); opacity: .35; }
.psr-couple-stage { display: grid; grid-template-columns: minmax(260px, 430px) minmax(80px, 150px) minmax(260px, 430px); align-items: center; justify-content: center; gap: 20px; }
.psr-portrait { --rx: 1deg; position: relative; text-align: center; }
.psr-portrait-groom { --ry: -3deg; }
.psr-portrait-bride { --ry: 3deg; }
.psr-photo-mount { position: relative; width: min(330px, 78vw); aspect-ratio: .78; margin: 0 auto 38px; padding: 13px; background: var(--psr-paper); box-shadow: 0 25px 34px rgba(64, 45, 31, .22), 0 0 0 9px rgba(255,255,255,.13); }
.psr-photo-mount::after { content: ""; position: absolute; z-index: -1; inset: -28px; background: var(--psr-clay); box-shadow: 0 18px 30px rgba(60,40,27,.16); }
.psr-photo-mount-arch, .psr-photo-mount-arch img, .psr-photo-mount-arch .psr-initial-fallback { border-radius: 180px 180px 5px 5px; }
.psr-photo-mount-arch::after { border-radius: 210px 210px 2px 2px; clip-path: polygon(10% 0, 92% 4%, 100% 96%, 3% 100%, 0 13%); }
.psr-photo-mount-petal, .psr-photo-mount-petal img, .psr-photo-mount-petal .psr-initial-fallback { border-radius: 48% 48% 42% 42% / 38% 38% 62% 62%; }
.psr-photo-mount-petal::after { background: var(--psr-olive); border-radius: 48% 48% 42% 42% / 38% 38% 62% 62%; clip-path: polygon(50% 0, 94% 10%, 100% 55%, 73% 100%, 22% 94%, 0 50%, 9% 13%); }
.psr-photo-mount img { width: 100%; height: 100%; object-fit: cover; }
.psr-initial-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: var(--psr-paper); background: var(--psr-charcoal); font-family: var(--psr-serif); font-size: 8rem; }
.psr-portrait h3 { margin: 4px 0 7px; font-family: var(--psr-serif); font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 400; line-height: 1; }
.psr-portrait > p:last-child { max-width: 360px; margin: 0 auto; font-size: .86rem; }
.psr-couple-amp { align-self: center; color: var(--psr-clay); font-family: var(--psr-serif); font-size: clamp(5rem, 11vw, 10rem); font-style: italic; text-align: center; }

/* Event inserts physically emerge from paper slots. */
.psr-events { background: var(--psr-ivory); }
.psr-event-slots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(35px, 7vw, 110px); width: min(1000px, 100%); margin-inline: auto; }
.psr-event-slot { position: relative; padding: 30px 24px 0; perspective: 900px; }
.psr-slot-line { position: absolute; z-index: 2; top: 17px; left: 0; width: 100%; height: 16px; border-radius: 50%; background: #5f4939; box-shadow: 0 -5px 0 var(--psr-parchment), 0 7px 12px rgba(45, 31, 22, .25); }
.psr-event-insert { position: relative; min-height: 500px; padding: clamp(38px, 5vw, 64px); background: var(--psr-paper); box-shadow: 0 28px 30px rgba(69, 48, 33, .17); clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 98%); transform: rotateX(-2deg); transition: transform 1.1s cubic-bezier(.15,.75,.25,1); }
.psr-event-slot:not(.is-visible) .psr-event-insert { transform: translateY(90px) rotateX(-10deg); }
.psr-event-insert-clay { color: var(--psr-paper); background: var(--psr-clay); clip-path: polygon(3% 0, 97% 1%, 100% 97%, 0 100%); }
.psr-event-index { display: block; margin-bottom: 70px; font-family: var(--psr-serif); font-size: 4.5rem; line-height: 1; opacity: .22; }
.psr-event-insert > p { margin: 0 0 8px; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.psr-event-insert h3 { margin: 0 0 20px; font-family: var(--psr-serif); font-size: clamp(2.4rem, 5vw, 4.8rem); font-weight: 400; line-height: 1; }
.psr-event-insert time, .psr-event-insert strong, .psr-event-insert address { display: block; }
.psr-event-insert time { margin-bottom: 30px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; }
.psr-event-insert strong { margin-bottom: 7px; font-size: 1rem; }
.psr-event-insert address { font-size: .84rem; opacity: .72; }

.psr-location { display: grid; place-items: center; min-height: 85svh; color: var(--psr-paper); background: var(--psr-charcoal); }
.psr-location-cutout { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(45px, 9vw, 140px); width: min(960px, 100%); }
.psr-location-pin { position: relative; display: grid; place-items: center; width: min(330px, 70vw); aspect-ratio: .76; margin-inline: auto; border-radius: 50% 50% 8px 8px; background: var(--psr-clay); box-shadow: 20px 26px 0 #d8c6a8, 36px 43px 40px rgba(0,0,0,.3); }
.psr-location-pin::before { content: ""; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--psr-charcoal); box-shadow: inset 0 8px 14px rgba(0,0,0,.45); }
.psr-location-pin::after { content: ""; position: absolute; bottom: -42px; width: 84px; height: 70px; background: var(--psr-clay); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.psr-location h2 { margin-bottom: 24px; }
.psr-location address { max-width: 520px; margin-bottom: 34px; color: rgba(251,247,236,.68); }
.psr-location .psr-kicker { color: #d2a96e; }
.psr-location .psr-button { border-color: var(--psr-paper); }

/* Story is a staggered stack of bound paper chapters. */
.psr-story { background: var(--psr-parchment); }
.psr-story-stack { display: flex; flex-direction: column; width: min(900px, 100%); margin-inline: auto; }
.psr-story-sheet { position: sticky; top: 28px; display: grid; grid-template-columns: 120px 1fr; gap: 26px; min-height: 300px; margin-bottom: 55px; padding: clamp(34px, 6vw, 76px); background: var(--psr-paper); box-shadow: 0 24px 35px rgba(67, 47, 32, .16); clip-path: polygon(0 2%, 97% 0, 100% 96%, 4% 100%); rotate: -.55deg; }
.psr-story-sheet:nth-child(even) { background: #efe4d0; clip-path: polygon(3% 0, 100% 3%, 96% 100%, 0 97%); }
.psr-story-sheet:nth-child(2) { top: 46px; rotate: .4deg; }
.psr-story-sheet:nth-child(3) { top: 64px; rotate: -.25deg; }
.psr-story-sheet:nth-child(4) { top: 82px; rotate: .55deg; }
.psr-story-sheet:nth-child(5) { top: 100px; rotate: -.4deg; }
.psr-story-sheet:nth-child(n+6) { top: 118px; rotate: .3deg; }
.psr-story-number { color: var(--psr-clay); font-family: var(--psr-serif); font-size: 4.8rem; line-height: 1; opacity: .35; }
.psr-story-sheet time { color: var(--psr-clay); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.psr-story-sheet h3 { margin: 7px 0 15px; font-family: var(--psr-serif); font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 400; line-height: 1.05; }
.psr-story-sheet p { max-width: 600px; margin: 0; color: rgba(37,37,34,.72); }

/* Gallery uses a tactile horizontal photo pile, deliberately not a card grid. */
.psr-gallery { overflow: hidden; background: var(--psr-olive); color: var(--psr-paper); }
.psr-gallery .psr-kicker { color: #e7bf82; }
.psr-gallery-shell { width: calc(100vw - max(24px, calc((100vw - 1180px) / 2))); max-width: 1300px; }
.psr-gallery-track { display: flex; align-items: center; gap: clamp(20px, 4vw, 55px); padding: 50px 8vw 65px 15px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.psr-gallery-track::-webkit-scrollbar { display: none; }
.psr-gallery-photo { flex: 0 0 min(390px, 78vw); margin: 0; padding: 14px 14px 45px; color: var(--psr-charcoal); background: var(--psr-paper); box-shadow: 0 28px 38px rgba(19,27,17,.28); rotate: -2deg; scroll-snap-align: center; transition: rotate .35s ease, translate .35s ease; }
.psr-gallery-photo:nth-child(even) { translate: 0 20px; }
.psr-gallery-photo:nth-child(3n+2) { rotate: 1.5deg; }
.psr-gallery-photo:nth-child(3n) { rotate: -1deg; }
.psr-gallery-photo:hover { rotate: 0deg; translate: 0 -7px; }
.psr-gallery-photo img { width: 100%; aspect-ratio: .82; object-fit: cover; background: var(--psr-parchment); }
.psr-gallery-photo figcaption { margin-top: 14px; font-size: .65rem; letter-spacing: .16em; text-align: right; }
.psr-gallery-controls { display: flex; align-items: center; gap: 18px; width: max-content; margin-left: 15px; }
.psr-gallery-controls button { display: grid; place-items: center; width: 46px; aspect-ratio: 1; border: 1px solid rgba(251,247,236,.6); border-radius: 50%; color: var(--psr-paper); background: transparent; cursor: pointer; }
.psr-gallery-controls button:hover { color: var(--psr-charcoal); background: var(--psr-paper); }
.psr-gallery-controls span { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }

/* Gift information is pulled from a working paper envelope. */
.psr-gift { min-height: 105svh; background: var(--psr-ivory); }
.psr-envelope { position: relative; width: min(720px, 94vw); height: 470px; margin: 160px auto 0; perspective: 1200px; }
.psr-envelope-back, .psr-envelope-front { position: absolute; inset: 0; background: #c98a6c; box-shadow: 0 30px 40px rgba(72, 47, 32, .22); }
.psr-envelope-back::before { content: ""; position: absolute; z-index: 3; inset: 0; background: #d39878; clip-path: polygon(0 0, 50% 55%, 100% 0); transform-origin: top; transition: transform .7s cubic-bezier(.2,.75,.2,1), z-index 0s .3s; }
.psr-envelope-front { z-index: 4; box-shadow: none; clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); background: linear-gradient(150deg, #b96f50 0 50%, #c77e5f 50%); }
.psr-gift-insert { position: absolute; z-index: 2; left: 6%; bottom: 4%; width: 88%; max-height: 560px; padding: clamp(28px, 5vw, 58px); overflow: auto; background: var(--psr-paper); box-shadow: 0 15px 25px rgba(63,42,28,.16); transform: translateY(0); transition: transform .85s cubic-bezier(.2,.75,.2,1); }
.psr-envelope.is-open .psr-envelope-back::before { z-index: 1; transform: rotateX(180deg); }
.psr-envelope.is-open .psr-gift-insert { z-index: 5; transform: translateY(-54%); }
.psr-envelope-seal { position: absolute; z-index: 7; left: 50%; top: 42%; width: 74px; aspect-ratio: 1; translate: -50% -50%; border: 0; border-radius: 50%; color: var(--psr-paper); background: var(--psr-charcoal); box-shadow: 0 6px 12px rgba(50,31,20,.3); font-family: var(--psr-serif); cursor: pointer; transition: top .7s, background .25s, transform .25s ease; }
.psr-envelope.is-open .psr-envelope-seal { top: 96%; background: var(--psr-gold); }
.psr-bank-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; padding: 17px 0; border-top: 1px solid rgba(37,37,34,.15); }
.psr-bank-line span, .psr-bank-line small { font-size: .72rem; }
.psr-bank-line strong { font-size: 1.05rem; letter-spacing: .08em; }
.psr-bank-line small { grid-column: 1; color: rgba(37,37,34,.58); }
.psr-copy { grid-column: 2; grid-row: 1 / span 2; border: 0; color: var(--psr-clay); background: transparent; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.psr-gift-insert address { display: grid; gap: 5px; margin-top: 16px; padding-top: 18px; border-top: 1px solid rgba(37,37,34,.15); font-size: .78rem; }

/* RSVP is a perforated response slip. */
.psr-rsvp { background: var(--psr-clay); }
.psr-response-slip { width: min(820px, 100%); margin-inline: auto; padding: clamp(34px, 7vw, 82px); background: var(--psr-paper); box-shadow: 18px 24px 0 rgba(74,41,30,.28); clip-path: polygon(0 0, 100% 0, 100% 4%, 98% 5%, 100% 7%, 98% 9%, 100% 11%, 98% 13%, 100% 15%, 100% 100%, 0 100%, 0 15%, 2% 13%, 0 11%, 2% 9%, 0 7%, 2% 5%, 0 4%); }
.psr-slip-header { margin-bottom: 40px; padding-bottom: 34px; border-bottom: 1px dashed rgba(37,37,34,.45); }
.psr-response-slip form, .psr-wish-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.psr-response-slip label, .psr-wish-form label { display: grid; gap: 7px; }
.psr-response-slip label > span, .psr-wish-form label > span, .psr-response-slip legend { font-size: .67rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.psr-response-slip input, .psr-response-slip textarea, .psr-wish-form input, .psr-wish-form textarea { width: 100%; border: 0; border-bottom: 1px solid rgba(37,37,34,.45); border-radius: 0; padding: 11px 2px; color: var(--psr-charcoal); background: transparent; resize: vertical; }
.psr-response-slip textarea, .psr-response-slip fieldset, .psr-response-slip form > label:nth-of-type(4), .psr-response-slip .psr-button, .psr-response-slip .psr-form-status { grid-column: 1 / -1; }
.psr-response-slip fieldset { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; border: 0; }
.psr-response-slip legend { margin-bottom: 10px; }
.psr-radio { position: relative; }
.psr-radio input { position: absolute; opacity: 0; pointer-events: none; }
.psr-radio span { display: block; padding: 9px 14px; border: 1px solid rgba(37,37,34,.3); cursor: pointer; }
.psr-radio input:checked + span { color: var(--psr-paper); background: var(--psr-charcoal); }
.psr-response-slip .psr-button { justify-self: start; }
.psr-form-status { min-height: 1.5em; margin: 0; font-size: .78rem; }
.psr-form-status.is-success { color: #47653d; }
.psr-form-status.is-error { color: #a23d2f; }

.psr-wishes { background: var(--psr-paper); }
.psr-wishes-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 9vw, 130px); align-items: start; }
.psr-wish-form { position: sticky; top: 40px; display: grid; grid-template-columns: 1fr; padding: clamp(28px, 5vw, 55px); border: 1px solid rgba(37,37,34,.2); background: var(--psr-ivory); box-shadow: 13px 15px 0 var(--psr-parchment); }
.psr-wish-form .psr-button { justify-self: start; }
.psr-wish-ribbons { display: flex; flex-direction: column; gap: 22px; }
.psr-wish-ribbon { position: relative; padding: 28px clamp(24px, 5vw, 48px); background: #eadbc2; box-shadow: 0 15px 22px rgba(71,51,35,.12); clip-path: polygon(0 6%, 98% 0, 100% 94%, 3% 100%); }
.psr-wish-ribbon:nth-child(even) { margin-left: 9%; background: #d7ab8e; clip-path: polygon(3% 0, 100% 5%, 97% 100%, 0 94%); }
.psr-wish-ribbon strong { font-family: var(--psr-serif); font-size: 1.35rem; font-weight: 400; }
.psr-wish-ribbon p { margin: 7px 0 0; font-size: .86rem; }

.psr-closing { display: grid; place-items: center; overflow: hidden; min-height: 100svh; color: var(--psr-paper); background: var(--psr-charcoal); text-align: center; }
.psr-closing::before, .psr-closing::after { content: ""; position: absolute; z-index: -1; width: 60vw; height: 85vw; background: var(--psr-clay); box-shadow: 0 0 40px rgba(0,0,0,.28); }
.psr-closing::before { left: -38vw; top: -25vw; rotate: 27deg; clip-path: polygon(0 0, 100% 18%, 78% 100%, 0 73%); }
.psr-closing::after { right: -42vw; bottom: -35vw; rotate: -18deg; background: var(--psr-parchment); clip-path: polygon(17% 0, 100% 12%, 100% 100%, 0 70%); }
.psr-closing-fold { position: relative; z-index: 2; width: min(720px, 100%); }
.psr-closing h2 { margin: 0 0 30px; font-family: var(--psr-serif); font-size: clamp(3.5rem, 8vw, 7.6rem); font-weight: 400; line-height: .9; }
.psr-closing h2 span { color: #d4aa6c; font-style: italic; }
.psr-closing p:not(.psr-kicker) { max-width: 560px; margin: 0 auto; color: rgba(251,247,236,.68); }
.psr-closing-seal { display: grid; place-items: center; width: 94px; aspect-ratio: 1; margin: 52px auto 0; border: 1px solid rgba(251,247,236,.4); border-radius: 50%; font-family: var(--psr-serif); }

/* Task 2: tactile paper mechanics, sculptural depth, and transform-only shadow motion. */
.psr-sheet-section:not(.psr-hero):not(.psr-story) {
    content-visibility: auto;
    contain-intrinsic-size: auto 920px;
}
.psr-page-fold {
    position: absolute;
    z-index: 18;
    top: -1px;
    left: 0;
    width: 100%;
    height: clamp(58px, 9vw, 118px);
    pointer-events: none;
    opacity: .95;
    background: linear-gradient(178deg, rgba(255,255,255,.72), rgba(224,211,188,.96) 52%, rgba(106,77,52,.17));
    box-shadow: 0 22px 28px rgba(54,38,26,.18);
    transform: perspective(1000px) rotateX(0deg) scaleY(1);
    transform-origin: top center;
    backface-visibility: hidden;
}
.psr-sheet-section.is-page-unfolding > .psr-page-fold {
    animation: psr-page-unfold 1.05s cubic-bezier(.18,.72,.2,1) both;
}
@keyframes psr-page-unfold {
    0% { opacity: .95; transform: perspective(1000px) rotateX(0deg) scaleY(1); }
    62% { opacity: .68; transform: perspective(1000px) rotateX(-74deg) scaleY(.74); }
    100% { opacity: 0; transform: perspective(1000px) rotateX(-89deg) scaleY(.4); }
}

.psr-paper-curl {
    position: absolute;
    z-index: 12;
    right: -1px;
    bottom: -1px;
    width: clamp(34px, 5vw, 62px);
    aspect-ratio: 1;
    pointer-events: none;
    opacity: .72;
    background: linear-gradient(135deg, transparent 0 46%, rgba(93,67,45,.14) 47% 52%, #eadfc9 53% 69%, #fffaf0 70% 100%);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    filter: drop-shadow(-5px -5px 5px rgba(59,42,28,.12));
    transform: perspective(240px) rotateX(7deg) rotateY(-9deg) scale(.92);
    transform-origin: right bottom;
    transition: transform .45s cubic-bezier(.2,.75,.2,1), opacity .35s ease;
}
.psr-opening-sheet:hover > .psr-paper-curl,
.psr-story-sheet:hover > .psr-paper-curl,
.psr-gallery-photo:hover > .psr-paper-curl,
.psr-event-insert:hover > .psr-paper-curl {
    opacity: .94;
    transform: perspective(240px) rotateX(12deg) rotateY(-16deg) scale(1.06);
}
.psr-event-insert-clay > .psr-paper-curl {
    background: linear-gradient(135deg, transparent 0 46%, rgba(50,29,22,.2) 47% 52%, #b9755a 53% 69%, #c88669 70% 100%);
}

.psr-depth-flora,
.psr-opening-flora,
.psr-book-flora,
.psr-couple-flora,
.psr-location-flora,
.psr-closing-flora {
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(8px 12px 8px rgba(55,39,27,.18));
    transform-origin: 50% 92%;
}
.psr-depth-flora { position: absolute; width: clamp(115px, 15vw, 230px); opacity: .18; }
.psr-depth-flora-a { left: -74px; bottom: 25%; }
.psr-depth-flora-b { right: -75px; top: 9%; --scale: .78; }

/* A dimensional folio that parts like a small pop-up book. */
.psr-opening {
    background:
        radial-gradient(circle at 50% 46%, rgba(255,250,237,.8), transparent 38%),
        linear-gradient(135deg, #e5d6be, var(--psr-parchment) 48%, #d9c4a5);
    perspective: 1800px;
}
.psr-opening-stage {
    position: relative;
    z-index: 2;
    width: min(760px, 92vw);
    height: min(720px, 84svh);
    transform-style: preserve-3d;
    transform: perspective(1800px) rotateX(3deg);
}
.psr-opening-shadow {
    position: absolute;
    z-index: -2;
    left: 8%;
    right: 8%;
    bottom: -4%;
    height: 20%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(55,38,26,.34), rgba(55,38,26,0) 70%);
    opacity: var(--psr-shadow-opacity);
    transform: translate3d(var(--psr-shadow-x), var(--psr-shadow-y), -80px) scale(1.08, .72);
    transition: transform .35s linear, opacity .35s ease;
}
.psr-opening-floor {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute;
    z-index: 0;
    inset: 47% 1% 2%;
    background: linear-gradient(168deg, #f8f0df, #e2d2b8 70%);
    box-shadow: 0 30px 46px rgba(59,41,27,.17);
    clip-path: polygon(2% 8%, 50% 0, 98% 8%, 92% 100%, 8% 100%);
    transform: translateZ(-5px) rotateX(58deg);
    transform-origin: center top;
}
.psr-opening .psr-opening-fold {
    top: 5%;
    width: 50%;
    height: 90%;
    background:
        linear-gradient(115deg, rgba(255,255,255,.5), transparent 28%),
        var(--psr-ivory);
    box-shadow: inset 0 0 42px rgba(89,63,42,.08), 0 24px 38px rgba(55,38,26,.14);
    backface-visibility: hidden;
}
.psr-opening .psr-opening-fold-left { left: 0; clip-path: polygon(0 1%, 100% 0, 96% 50%, 100% 100%, 2% 98%); }
.psr-opening .psr-opening-fold-right { right: 0; clip-path: polygon(0 0, 100% 1%, 98% 98%, 0 100%, 4% 50%); }
.psr-opening-sculpture {
    position: absolute;
    z-index: 4;
    inset: 10% 12% 13%;
    pointer-events: none;
    transform-style: preserve-3d;
    transition: transform .85s cubic-bezier(.2,.72,.2,1), opacity .5s ease;
}
.psr-opening-arch {
    position: absolute;
    left: 50%;
    bottom: 15%;
    width: 48%;
    height: 61%;
    border: 18px solid #d8c4a6;
    border-bottom: 0;
    border-radius: 50% 50% 0 0;
    transform: translate3d(-50%, 0, 14px);
}
.psr-opening-arch-back { width: 62%; height: 72%; border-color: rgba(104,112,91,.38); transform: translate3d(-50%, 0, -6px); }
.psr-opening-arch-front { opacity: .7; }
.psr-opening-flora { position: absolute; bottom: -2%; width: clamp(120px, 24vw, 225px); }
.psr-opening-flora-left { left: -2%; --psr-base-ry: 8deg; }
.psr-opening-flora-right { right: -3%; --psr-base-ry: -10deg; --scale: .86; }
.psr-opening .psr-opening-sheet {
    position: absolute;
    z-index: 7;
    top: 50%;
    left: 50%;
    width: min(500px, 76%);
    --mx: -50%;
    --my: -50%;
    --psr-base-z: 52px;
    box-shadow: 0 30px 65px rgba(64,44,29,.24), inset 0 0 0 1px rgba(94,68,47,.08);
    transition: transform .9s cubic-bezier(.2,.74,.2,1), opacity .62s ease;
}
.psr-opening.is-open .psr-opening-fold-left { transform: perspective(1100px) rotateY(-86deg) translateZ(18px); }
.psr-opening.is-open .psr-opening-fold-right { transform: perspective(1100px) rotateY(86deg) translateZ(18px); }
.psr-opening.is-open .psr-opening-sheet { --scale: .78; --psr-base-z: 190px; opacity: 0; }
.psr-opening.is-open .psr-opening-sculpture { opacity: 0; transform: translate3d(0, 30px, 110px) scale(1.08); }
.psr-opening.is-open .psr-opening-shadow { opacity: 0; transform: translate3d(0, 46px, -80px) scale(1.28, .45); }

/* The hero pages open first, then the paper sculpture rises from the fold. */
.psr-book {
    filter: none;
    perspective: 1800px;
    transform: perspective(1800px) rotateX(calc(4deg + var(--psr-scene-rx))) rotateY(var(--psr-scene-ry));
    transform-style: preserve-3d;
    transition: transform .25s linear;
}
.psr-book-shadow {
    position: absolute;
    z-index: -4;
    inset: 7% 3% -7%;
    border-radius: 46%;
    pointer-events: none;
    opacity: var(--psr-shadow-opacity);
    background: radial-gradient(ellipse, rgba(51,35,23,.62), rgba(51,35,23,0) 68%);
    transform: translate3d(var(--psr-shadow-x), var(--psr-shadow-y), -90px) scale(1.03, .82);
}
.psr-book-page {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 1.12s cubic-bezier(.18,.72,.16,1), opacity .72s ease, box-shadow 1.1s ease;
}
.psr-book-page::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(96deg, rgba(86,61,39,.055), transparent 14% 83%, rgba(255,255,255,.52));
}
.psr-book-page-left {
    z-index: 2;
    opacity: .42;
    transform: translateZ(7px) rotateY(78deg);
    transform-origin: right center;
}
.psr-book-page-right {
    z-index: 1;
    opacity: .42;
    transform: translateZ(5px) rotateY(-78deg);
    transform-origin: left center;
}
.psr-body.psr-experience-open .psr-book.is-visible .psr-book-page-left,
.psr-body.psr-experience-open .psr-book.is-visible .psr-book-page-right {
    opacity: 1;
    transform: translateZ(0) rotateY(0deg);
}
.psr-book-layer { position: absolute; pointer-events: none; }
.psr-book-layer-round {
    right: -9%;
    bottom: -19%;
    width: 58%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #e9ddc9;
    box-shadow: -18px -18px 32px rgba(77,54,36,.08);
    transform: translateZ(8px);
}
.psr-book-flora { position: absolute; z-index: 4; }
.psr-book-flora-left { right: -2%; bottom: -13%; width: min(180px, 34%); opacity: .42; --scale: .76; }
.psr-paper-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: min(450px, 100%);
    min-height: 500px;
    transform-style: preserve-3d;
}
.psr-paper-halo {
    position: absolute;
    left: 50%;
    bottom: 7%;
    --mx: -50%;
    border-radius: 50% 50% 5px 5px;
    transform-origin: center bottom;
}
.psr-paper-halo-back { width: 94%; height: 83%; background: #cbb896; opacity: .46; --psr-base-z: 4px; }
.psr-paper-halo-front { width: 78%; height: 70%; border: 3px solid rgba(168,95,69,.5); border-bottom: 0; --psr-base-z: 10px; }
.psr-arch-lift {
    position: relative;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 100%;
    opacity: .25;
    transform: translate3d(0, 28%, 22px) rotateX(-82deg);
    transform-origin: center bottom;
    transition: transform 1.15s .3s cubic-bezier(.16,.78,.18,1), opacity .7s .28s ease;
    transform-style: preserve-3d;
}
.psr-body.psr-experience-open .psr-book.is-visible .psr-arch-lift { opacity: 1; transform: translate3d(0, 0, 22px) rotateX(0deg); }
.psr-book-flora-right {
    right: -6%;
    bottom: -1%;
    width: min(185px, 42%);
    opacity: .22;
    --scale: .16;
    --psr-base-z: 44px;
    transition: transform 1.05s .55s cubic-bezier(.18,.8,.18,1), opacity .65s .5s ease;
}
.psr-body.psr-experience-open .psr-book.is-visible .psr-book-flora-right { opacity: 1; --scale: .82; }
.psr-popup-foot {
    position: absolute;
    z-index: 3;
    bottom: 5%;
    width: 29%;
    height: 12%;
    background: #d8c4a6;
    clip-path: polygon(0 0, 100% 25%, 78% 100%, 14% 82%);
    transform: translateZ(14px) rotateX(58deg);
    transform-origin: center bottom;
}
.psr-popup-foot-left { left: 9%; }
.psr-popup-foot-right { right: 4%; background: #b97056; transform: translateZ(20px) rotateX(61deg) scaleX(.8); }
.psr-book-page-right > .psr-paper-curl { z-index: 9; }

.psr-photo-mount { z-index: 0; isolation: isolate; transform-style: preserve-3d; }
.psr-photo-mount::before {
    content: "";
    position: absolute;
    z-index: -3;
    inset: 7% -9% -10% 9%;
    background: rgba(58,40,27,.28);
    filter: blur(14px);
    opacity: var(--psr-shadow-opacity);
    transform: translate3d(var(--psr-shadow-x), var(--psr-shadow-y), -12px) rotate(2deg);
}
.psr-portrait { --rx: 0deg; --psr-base-rx: 1deg; }
.psr-portrait-groom { --psr-base-ry: -3deg; }
.psr-portrait-bride { --psr-base-ry: 3deg; }
.psr-couple-stage { position: relative; }
.psr-couple-flora { position: absolute; z-index: -1; width: clamp(155px, 22vw, 280px); opacity: .52; }
.psr-couple-flora-left { left: -8%; bottom: -12%; --psr-base-ry: 8deg; }
.psr-couple-flora-right { right: -9%; top: -12%; --psr-base-ry: -9deg; --scale: .84; }

.psr-location-pin { isolation: isolate; }
.psr-location-flora { position: absolute; z-index: 4; right: -28%; bottom: -14%; width: 58%; }
.psr-story-sheet { transform-style: preserve-3d; }
.psr-story-sheet::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 12px -10px -13px 16px;
    background: rgba(100,71,48,.09);
    clip-path: inherit;
    transform: translateZ(-10px) rotate(.5deg);
}

.psr-gallery-photo,
.psr-gallery-photo:nth-child(even),
.psr-gallery-photo:nth-child(3n+2),
.psr-gallery-photo:nth-child(3n) {
    --psr-base-tilt: -2deg;
    --psr-card-tilt: var(--psr-base-tilt);
    --psr-card-y: 0px;
    --psr-card-scale: 1;
    --psr-card-hover-y: 0px;
    --psr-card-hover-scale: 0;
    position: relative;
    z-index: calc(20 - var(--psr-photo-index));
    margin-right: -22px;
    rotate: 0deg;
    translate: 0 0;
    transform: translate3d(0, calc(var(--psr-card-y) + var(--psr-card-hover-y)), 0) rotate(var(--psr-card-tilt)) scale(calc(var(--psr-card-scale) + var(--psr-card-hover-scale)));
    transition: transform .38s cubic-bezier(.2,.75,.2,1), box-shadow .35s ease;
    transform-origin: 50% 82%;
}
.psr-gallery-photo:nth-child(3n+2) { --psr-base-tilt: 1.7deg; }
.psr-gallery-photo:nth-child(3n) { --psr-base-tilt: -.8deg; }
.psr-gallery-photo:last-child { margin-right: 0; }
.psr-gallery-photo:hover {
    --psr-card-hover-y: -10px;
    --psr-card-hover-scale: .025;
    rotate: 0deg;
    translate: 0 0;
    z-index: 25;
    box-shadow: 0 36px 50px rgba(19,27,17,.34);
}
.psr-gallery-photo::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 10px -9px -12px 12px;
    background: #d9c8ac;
    box-shadow: 0 17px 22px rgba(18,26,16,.18);
    transform: rotate(2.4deg) translateZ(-4px);
}
.psr-gallery-controls button { transition: transform .25s ease, color .25s ease, background .25s ease; }
.psr-gallery-controls button:hover { transform: translate3d(0, -3px, 0) rotate(4deg); }
.psr-gallery-controls button:active { transform: translate3d(0, 1px, 0) scale(.94); }

.psr-envelope { transform-style: preserve-3d; }
.psr-envelope-seal:hover { transform: rotate(-5deg) scale(1.04); }
.psr-envelope-seal:active { transform: scale(.96); }
.psr-gift-insert > .psr-paper-curl { position: absolute; }

.psr-closing-flora { position: absolute; z-index: 1; width: clamp(180px, 25vw, 340px); opacity: .58; }
.psr-closing-flora-left { left: -4%; bottom: -5%; }
.psr-closing-flora-right { right: -5%; top: -4%; --scale: .82; }

@media (max-width: 860px) {
    .psr-depth-arch { display: none; }
    .psr-book { grid-template-columns: 1fr; min-height: auto; transform: none; }
    .psr-book-page { min-height: 67svh; }
    .psr-book-page-left { min-height: 43svh; border-radius: 7px 7px 0 0; clip-path: polygon(2% 0, 98% 2%, 100% 100%, 50% 96%, 0 100%); }
    .psr-book-page-right { border-radius: 0 0 7px 7px; clip-path: polygon(0 3%, 50% 0, 100% 3%, 98% 100%, 2% 98%); }
    .psr-book-spine { top: 43svh; left: 2%; right: 2%; bottom: auto; width: auto; height: 24px; translate: 0 -50%; background: linear-gradient(180deg, transparent, rgba(72,50,33,.14), rgba(255,255,255,.7), rgba(72,50,33,.14), transparent); }
    .psr-hero-quote { position: static; width: min(320px, 85%); margin: 54px auto 0; text-align: center; }
    .psr-couple-stage { grid-template-columns: 1fr; gap: 70px; }
    .psr-couple-amp { order: 2; margin-block: -50px; }
    .psr-portrait-groom { order: 1; }
    .psr-portrait-bride { order: 3; }
    .psr-event-slots { grid-template-columns: 1fr; max-width: 560px; }
    .psr-location-cutout { grid-template-columns: 1fr; text-align: center; }
    .psr-location address { margin-inline: auto; }
    .psr-wishes-layout { grid-template-columns: 1fr; }
    .psr-wish-form { position: static; }
    .psr-opening-stage { height: min(680px, 84svh); transform: perspective(1600px) rotateX(2deg); }
    .psr-opening .psr-opening-sheet { width: min(500px, 80%); }
    .psr-opening-arch { border-width: 13px; }
    .psr-book-page-left { transform: translateZ(4px) rotateX(62deg); transform-origin: center bottom; }
    .psr-book-page-right { transform: translateZ(4px) rotateX(-62deg); transform-origin: center top; }
    .psr-body.psr-experience-open .psr-book.is-visible .psr-book-page-left,
    .psr-body.psr-experience-open .psr-book.is-visible .psr-book-page-right { transform: translateZ(0) rotateX(0deg); }
    .psr-paper-stage { min-height: 520px; }
    .psr-book-shadow { inset: 8% 0 -4%; }
    .psr-couple-flora { opacity: .34; }
}

@media (max-width: 620px) {
    .psr-sheet-section { min-height: auto; padding-top: 96px; padding-bottom: 96px; }
    .psr-section-heading h2, .psr-location h2, .psr-response-slip h2 { font-size: clamp(2.3rem, 12vw, 4rem); }
    .psr-opening-sheet { padding: 42px 25px; }
    .psr-opening::before, .psr-opening::after { opacity: .5; }
    .psr-music-label { display: none; }
    .psr-music { width: 46px; padding: 7px; }
    .psr-book { width: 100%; }
    .psr-book-page { padding: 42px 28px; }
    .psr-book-page-left h2 { font-size: clamp(3.6rem, 20vw, 6rem); }
    .psr-hero-arch { width: min(300px, 79vw); }
    .psr-scroll-cue { display: none; }
    .psr-countdown-folds { grid-template-columns: 1fr 1fr; }
    .psr-count-unit:nth-child(2) { border-right: 0; }
    .psr-count-unit:nth-child(-n+2) { border-bottom: 1px dashed rgba(37,37,34,.4); }
    .psr-event-slot { padding-inline: 10px; }
    .psr-event-insert { min-height: 440px; }
    .psr-location-pin { width: 230px; }
    .psr-story-sheet { position: relative; top: auto; grid-template-columns: 1fr; margin-bottom: 28px; rotate: 0deg; }
    .psr-story-number { font-size: 3.5rem; }
    .psr-gallery-shell { width: calc(100vw - 24px); }
    .psr-gallery-track { padding-left: 3px; }
    .psr-envelope { height: 350px; margin-top: 130px; }
    .psr-gift-insert { padding: 26px; }
    .psr-envelope.is-open .psr-gift-insert { transform: translateY(-55%); }
    .psr-bank-line { grid-template-columns: 1fr; }
    .psr-copy { grid-column: 1; grid-row: auto; justify-self: start; padding: 8px 0; }
    .psr-response-slip form { grid-template-columns: 1fr; }
    .psr-response-slip textarea, .psr-response-slip fieldset, .psr-response-slip form > label:nth-of-type(4), .psr-response-slip .psr-button, .psr-response-slip .psr-form-status { grid-column: 1; }
    .psr-response-slip fieldset { display: grid; }
    .psr-wish-ribbon:nth-child(even) { margin-left: 0; }
    .psr-closing::before, .psr-closing::after { width: 95vw; height: 125vw; }
    .psr-page-fold { height: 62px; }
    .psr-opening-stage { width: 96vw; height: min(650px, 84svh); }
    .psr-opening .psr-opening-sheet { width: min(420px, 84%); }
    .psr-opening-flora { width: 128px; opacity: .72; }
    .psr-opening-arch-back { width: 72%; }
    .psr-book-layer-round { right: -18%; bottom: -11%; }
    .psr-book-flora-left { display: none; }
    .psr-paper-stage { min-height: 450px; }
    .psr-book-flora-right { right: -1%; width: 150px; }
    .psr-popup-foot { bottom: 8%; }
    .psr-couple-flora { width: 165px; opacity: .26; }
    .psr-couple-flora-left { left: -20%; }
    .psr-couple-flora-right { right: -22%; }
    .psr-location-flora { right: -20%; width: 50%; }
    .psr-gallery-photo,
    .psr-gallery-photo:nth-child(even),
    .psr-gallery-photo:nth-child(3n+2),
    .psr-gallery-photo:nth-child(3n) { margin-right: -12px; }
    .psr-closing-flora { width: 190px; opacity: .42; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .psr-body *, .psr-body *::before, .psr-body *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .psr-motion { --depth-x: 0px !important; --depth-y: 0px !important; --rx: 0deg !important; --ry: 0deg !important; }
    .psr-page-fold { display: none; }
    .psr-opening-stage, .psr-book { transform: none !important; }
    .psr-book-page-left, .psr-book-page-right { opacity: 1 !important; transform: none !important; }
    .psr-arch-lift { opacity: 1 !important; transform: translate3d(0, 0, 22px) !important; }
    .psr-book-flora-right { opacity: 1 !important; --scale: .82 !important; }
    .psr-gallery-photo { --psr-card-y: 0px !important; --psr-card-scale: 1 !important; }
}
