/* ============================================================
   SAVE THE DATE / SAVE THE EVENING — standalone page
   Photobooth theme: light, blue-accented, envelope reveal with
   a photo strip pulled from inside, then the details/RSVP CTA.
   ============================================================ */
:root {
    --paper: #f3f9fc;
    --panel: #e1eef5;
    --ink: #1c2b35;
    --ink-dim: rgba(28,43,53,0.62);
    --accent: #6fb3d8;
    --accent-deep: #2f6d90;
    --strip: #ffffff;
    --line: rgba(28,43,53,0.14);
    --wax-light: #5b9bc2;
    --wax-deep: #163a4d;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    overflow-x: hidden;
}
body {
    background: var(--strip);
    color: var(--ink);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 6vw, 60px) 20px;
    overflow-x: hidden;
}
html.scroll-lock {
    height: 100%;
    overflow: hidden;
}
body.scroll-lock {
    height: 100vh;
    overflow: hidden;
    align-items: flex-start;
}
/* ---------- pleated fabric page background ---------- */
.fabric-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(255,255,255,0.28), rgba(0,0,0,0.05) 88%),
        linear-gradient(165deg, #ffffff, #f1f1ef);
}
.fabric-bg::before {
    content: "";
    position: absolute;
    top: -25%; bottom: -25%; left: -70%; right: -70%;
    background: repeating-linear-gradient(
        93deg,
        transparent 0px,
        transparent 70px,
        rgba(0,0,0,0.05) 130px,
        rgba(255,255,255,0.5) 190px,
        rgba(255,255,255,0.68) 230px,
        rgba(255,255,255,0.38) 270px,
        rgba(0,0,0,0.035) 330px,
        transparent 390px,
        transparent 520px
    );
    filter: blur(18px);
    animation: fabricDrift 130s linear infinite;
}
.fabric-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 55% 40% at 30% 30%, rgba(255,255,255,0.5), transparent 65%);
    mix-blend-mode: screen;
    animation: fabricSheen 32s ease-in-out infinite;
}
@keyframes fabricDrift {
    from { transform: translateX(0); }
    to { transform: translateX(-2600px); }
}
@keyframes fabricSheen {
    0%, 100% { background-position: 20% 25%; }
    50% { background-position: 75% 65%; }
}
@media (prefers-reduced-motion: reduce) {
    .fabric-bg::before, .fabric-bg::after { animation: none; }
}

.display { font-family: 'Fraunces', serif; font-weight: 500; }
.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

.flash-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #fff;
    pointer-events: none;
    animation: flashPop 0.7s ease forwards;
}
@keyframes flashPop { 0% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .flash-overlay { display: none; } }

/* ---------- iOS-style "You've got mail" notification banner ---------- */
.ios-notification {
    position: fixed;
    top: 12px;
    left: 50%;
    width: min(92vw, 380px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18), 0 1px 2px rgba(0,0,0,0.06);
    transform: translate(-50%, -140%);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(.34,1.3,.4,1), opacity 0.3s ease;
    cursor: pointer;
    pointer-events: none;
}
.ios-notification.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}
.ios-notification.is-hidden {
    transform: translate(-50%, -140%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(.4,0,.6,1), opacity 0.35s ease;
    pointer-events: none;
}
@media (min-width: 1150px) {
    .ios-notification {
        left: auto;
        right: 28px;
        width: 360px;
        transform: translateY(-140%);
    }
    .ios-notification.is-visible { transform: translateY(0); }
    .ios-notification.is-hidden { transform: translateY(-140%); }
}
.ios-notif-icon {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    border-radius: 9px;
    background: linear-gradient(180deg, #4da8ff, #0060df);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.ios-notif-body { flex: 1 1 auto; min-width: 0; text-align: left; }
.ios-notif-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.ios-notif-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(60,60,67,0.6);
    text-transform: uppercase;
}
.ios-notif-time {
    font-family: -apple-system, BlinkMacSystemFont, 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    color: rgba(60,60,67,0.5);
    flex-shrink: 0;
}
.ios-notif-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Space Grotesk', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1c1c1e;
    margin-top: 1px;
}
.ios-notif-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    color: #3c3c43;
    margin-top: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
    .ios-notification { transition: opacity 0.3s ease; }
    .ios-notification.is-visible { transform: translate(-50%, 0); }
}

/* ---------- confetti burst, fired once the reveal completes ---------- */
.confetti-piece {
    position: absolute;
    top: 0;
    width: 7px;
    height: 12px;
    opacity: 0;
    border-radius: 2px;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
    100% { opacity: 0; transform: translate(var(--drift, 0px), 220px) rotate(var(--spin, 360deg)); }
}

.pb-page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
    text-align: center;
}
/* Re-enable this alongside the iOS mail notification in save_the_date.html —
   it exists to clear space so that banner doesn't cover the headline. */
/* @media (max-width: 1149px) {
    .pb-page { padding-top: 86px; }
} */

/* ---------- Ralph, running across the top with a little flag ---------- */
.ralph-banner {
    position: relative;
    width: 100%;
    height: 68px;
    overflow: hidden;
    margin-bottom: 6px;
}
.ralph-banner-runner {
    position: absolute;
    top: 50%;
    left: 100%;
    display: flex;
    align-items: center;
    animation: ralphRun 13s linear infinite, ralphBob 0.45s ease-in-out infinite;
}
.ralph-banner-photo {
    position: relative;
    z-index: 2;
    width: 78px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 8px rgba(28,43,53,0.25));
}
.ralph-banner-flag {
    position: relative;
    z-index: 1;
    white-space: nowrap;
    background: var(--accent-deep);
    color: var(--strip);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 10px 38px 10px 18px;
    margin-left: 8px;
    clip-path: polygon(0 0, 100% 0, 91% 50%, 100% 100%, 0 100%);
    box-shadow: 0 4px 10px rgba(28,43,53,0.2);
}
@keyframes ralphRun {
    from { left: 100%; }
    to { left: -260px; }
}
@keyframes ralphBob {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-56%); }
}
@media (prefers-reduced-motion: reduce) {
    .ralph-banner-runner { animation: none; left: 20px; transform: translateY(-50%); }
}

/* ---------- server flash messages (validation errors, success) ---------- */
.flash-wrap { margin-bottom: 20px; }
.flash {
    max-width: 480px;
    margin: 0 auto 10px;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
}
.flash-success { background: #eaf4f0; color: #1a5c44; border: 1px solid #a8d4c0; }
.flash-error { background: #fdf0ef; color: #7a2020; border: 1px solid #e8b5b5; }

.page-monogram {
    display: block;
    width: 60px;
    margin: 0 auto 12px;
    opacity: 0;
    animation: riseIn 0.8s ease 0.05s forwards;
}
.page-monogram-footer {
    margin: 28px auto 0;
    opacity: 0.85;
    animation: none;
}
.greeting-arch {
    width: 95%;
    max-width: 420px;
    margin: 0 auto;
    opacity: 0;
    animation: riseIn 0.8s ease 0.2s forwards;
}
.greeting-arch-svg { width: 100%; height: auto; display: block; overflow: visible; }
.greeting-arch-svg text {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 24px;
    fill: var(--ink-dim);
}
.headline {
    margin-top: 4px;
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: clamp(3.4rem, 15vw, 6rem);
    line-height: 1;
    white-space: nowrap;
    color: var(--accent-deep);
    opacity: 0;
    animation: riseIn 0.8s ease 0.35s forwards;
}
.headline em { font-style: normal; color: var(--accent-deep); }
.subline {
    margin-top: 8px;
    font-size: 1.15rem;
    color: var(--ink-dim);
    opacity: 0;
    animation: riseIn 0.8s ease 0.5s forwards;
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.key-details {
    margin-bottom: 10px;
}
.key-date {
    font-size: clamp(1.8rem, 6.5vw, 2.4rem);
    color: var(--ink);
}
.key-date sup {
    font-size: 0.55em;
    vertical-align: super;
}
.key-venue {
    margin-top: 25px;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-deep);
}
.timezone-note {
    margin-top: 10px;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--ink-dim);
}

/* ---------- envelope ---------- */
.envelope-stage {
    position: relative;
    width: 400px;
    max-width: 78vw;
    margin: 60px auto 0;
    padding-bottom: 20px;
    opacity: 0;
    animation: riseIn 0.8s ease 0.65s forwards;
}
@media (min-width: 1150px) {
    .envelope-stage { padding-bottom: 540px; }
}
.envelope-glow {
    position: absolute;
    top: 56px;
    left: 50%;
    width: 150%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -25%) scale(0.3);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(111,179,216,0.55) 32%, rgba(111,179,216,0) 68%);
    opacity: 0.16;
    z-index: 1;
    pointer-events: none;
    filter: blur(2px);
    animation: glowIdle 4.5s ease-in-out infinite;
}
@keyframes glowIdle {
    0%, 100% { opacity: 0.14; transform: translate(-50%, -25%) scale(0.28); }
    50% { opacity: 0.32; transform: translate(-50%, -25%) scale(0.34); }
}
.envelope-stage.is-open .envelope-glow {
    animation: glowBurst 1.6s cubic-bezier(.2,.7,.3,1) 0.15s forwards;
}
@keyframes glowBurst {
    0% { opacity: 0; transform: translate(-50%, -25%) scale(0.3); }
    35% { opacity: 0.85; }
    100% { opacity: 0; transform: translate(-50%, -25%) scale(1.25); }
}
@media (prefers-reduced-motion: reduce) {
    .envelope-glow { display: none; }
}
.envelope {
    position: relative;
    top: 56px;
    z-index: 3;
    width: 100%;
    aspect-ratio: 3 / 2;
    cursor: pointer;
    transition: opacity 0.6s ease 1.2s, transform 0.6s ease 1.2s;
}
.envelope:hover .envelope-body { box-shadow: 0 28px 60px rgba(28,43,53,0.3); }
.envelope-shadow {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -16px;
    height: 22px;
    background: radial-gradient(ellipse, rgba(28,43,53,0.35), rgba(28,43,53,0) 72%);
    filter: blur(4px);
    z-index: 0;
    pointer-events: none;
}
.envelope-body {
    position: absolute; inset: 0;
    background: var(--grain), var(--strip);
    background-blend-mode: multiply;
    background-size: 180px 180px, auto;
    border: 1px solid var(--accent-deep);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(28,43,53,0.22);
    transition: box-shadow 0.4s ease;
}
.envelope-liner {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(160deg, var(--wax-light), var(--accent-deep) 55%, var(--wax-deep));
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 50% 100%);
    border-radius: 8px 8px 0 0;
    z-index: 2;
}
.envelope-flap {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: var(--grain), var(--strip);
    background-blend-mode: multiply;
    background-size: 180px 180px, auto;
    clip-path: polygon(8px 1px, calc(100% - 8px) 1px, 50% 100%);
    transform-origin: top center;
    border-radius: 8px 8px 0 0;
    filter: drop-shadow(0 2px 3px rgba(28,43,53,0.18));
    transition: transform 0.9s cubic-bezier(.6,.1,.3,1);
    z-index: 3;
}
.envelope-flap-edge {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    transform-origin: top center;
    transition: transform 0.9s cubic-bezier(.6,.1,.3,1);
    pointer-events: none;
    z-index: 3;
}
.envelope-flap-edge svg { width: 100%; height: 100%; display: block; }
.envelope-flap-edge line {
    stroke: rgba(28,43,53,0.2);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}
.envelope-fold {
    position: absolute; inset: 0;
    border-radius: 8px;
    z-index: 2;
    pointer-events: none;
}
.envelope-fold svg { width: 100%; height: 100%; display: block; }
.envelope-fold line {
    stroke: rgba(28,43,53,0.14);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}
.envelope-seal {
    position: absolute;
    top: 50%; left: 50%;
    width: 52px; height: 52px;
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
}
.envelope-seal-backdrop {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(28,43,53,0.22);
    transition: opacity 0.3s ease;
}
.envelope-stage.is-open .envelope-seal-backdrop { opacity: 0; }
.envelope-seal-shimmer {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    overflow: hidden;
}
.envelope-seal-shimmer::after {
    content: "";
    position: absolute;
    top: -25%; left: -60%;
    width: 40%; height: 150%;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,0.85), transparent);
    transform: rotate(8deg);
    animation: sealShimmer 3.4s ease-in-out infinite;
}
@keyframes sealShimmer {
    0%, 40% { left: -60%; }
    60%, 100% { left: 140%; }
}
.envelope-seal-half {
    position: absolute;
    inset: 0;
    background: url("/static/images/monogram-black.png") center / 130% no-repeat, var(--strip);
    border: 1px solid var(--accent-deep);
    border-radius: 50%;
    transition: transform 0.6s ease 0.05s, opacity 0.5s ease 0.15s;
}
.envelope-seal-half-left { clip-path: inset(0 50% 0 0); }
.envelope-seal-half-right { clip-path: inset(0 0 0 50%); }
.envelope-hint {
    margin-top: 16px;
    font-size: 0.76rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-dim);
    transform: translateY(56px);
    animation: hintPulse 1.8s ease-in-out infinite;
}
@keyframes hintPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.envelope-stage.is-open .envelope-flap,
.envelope-stage.is-open .envelope-flap-edge {
    transform: rotateX(180deg);
}
.envelope-stage.is-open .envelope-seal-shimmer { opacity: 0; transition: opacity 0.15s ease; }
.envelope-stage.is-open .envelope-seal-half-left { transform: translate(-16px, 12px) rotate(-24deg); opacity: 0; }
.envelope-stage.is-open .envelope-seal-half-right { transform: translate(16px, 12px) rotate(24deg); opacity: 0; }
.envelope-stage.is-open .envelope { opacity: 0; transform: translateY(-14px) scale(0.94); pointer-events: none; }
.envelope-stage.is-open .envelope-hint { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .envelope, .envelope-flap, .envelope-flap-edge, .envelope-seal-half { transition-duration: 0.2s; transition-delay: 0s; }
    .envelope-seal-shimmer::after { animation: none; }
}

.invite-note {
    position: absolute;
    top: -34px;
    left: 50%;
    width: max-content;
    max-width: 80vw;
    transform: translate(-50%, 8px);
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--accent-deep);
    text-align: center;
    opacity: 0;
    z-index: 6;
    cursor: pointer;
    transition: opacity 0.7s ease 1.9s, transform 0.9s cubic-bezier(.2,.8,.3,1.1) 1.9s;
}
.envelope-stage.is-open .invite-note {
    opacity: 1;
    transform: translate(-50%, 0);
}
.invite-note.stamping { animation: inviteStamp 0.35s ease; }
@keyframes inviteStamp {
    0%, 100% { transform: translate(-50%, 0) scale(1); }
    30% { transform: translate(-50%, 0) scale(0.85); }
    60% { transform: translate(-50%, 0) scale(1.08); }
}
.invite-note.stamping::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 60px; height: 60px;
    border: 2px solid var(--accent-deep);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    animation: inviteStampRing 0.5s ease-out;
    pointer-events: none;
}
@keyframes inviteStampRing {
    0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.4); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}
@media (prefers-reduced-motion: reduce) {
    .invite-note { transition-duration: 0.4s; transition-delay: 0.1s; }
    .invite-note.stamping { animation: none; }
    .invite-note.stamping::after { animation: none; display: none; }
}

/* ---------- the signature photobooth strip, pulled from the envelope ---------- */
.strip-card {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 168px;
    max-width: 68vw;
    background: var(--grain), var(--strip);
    background-blend-mode: multiply;
    background-size: 180px 180px, auto;
    padding: 10px 10px 8px;
    box-shadow: 0 26px 54px rgba(28,43,53,0.3);
    transform: perspective(700px) translate(-50%, 34px) scale(0.64) rotateX(40deg);
    transform-origin: top center;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.85s ease 1.9s, transform 1.2s cubic-bezier(.16,.85,.24,1.15) 1.9s;
}
.envelope-stage.is-open .strip-card {
    opacity: 1;
    transform: perspective(700px) translate(-50%, 10px) scale(1) rotate(-4deg) rotateX(0deg);
    z-index: 6;
    animation: stripSway 6.5s ease-in-out 3.2s infinite;
}
@keyframes stripSway {
    0%, 100% { transform: translate(-50%, 10px) rotate(-4deg); }
    50% { transform: translate(-50%, 10px) rotate(-1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
    .strip-card { transition-duration: 0.4s; transition-delay: 0.1s; }
    .envelope-stage.is-open .strip-card { animation: none; }
}

.strip-venue {
    margin-bottom: 10px;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent-deep);
}
.frame { position: relative; aspect-ratio: 4/5; overflow: hidden; margin-bottom: 8px; background: var(--panel); cursor: pointer; }
.frame:last-of-type { margin-bottom: 0; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1); }
.frame img.developing {
    animation: polaroidDevelop 2.4s ease-out;
}
@keyframes polaroidDevelop {
    0% { filter: grayscale(1) brightness(2.4) contrast(0.15) saturate(0); }
    12% { filter: grayscale(1) brightness(2.4) contrast(0.15) saturate(0); }
    100% { filter: grayscale(1) brightness(1) contrast(1) saturate(1); }
}
.photo-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    animation: photoFlash 1s ease-out forwards;
    pointer-events: none;
}
@keyframes photoFlash {
    0% { opacity: 0.95; }
    100% { opacity: 0; }
}
.strip-card.shaking { animation: stripShake 0.45s ease; }
@keyframes stripShake {
    0%, 100% { transform: translate(-50%, 10px) rotate(-4deg); }
    20% { transform: translate(-50%, 10px) rotate(-9deg); }
    40% { transform: translate(-50%, 10px) rotate(3deg); }
    60% { transform: translate(-50%, 10px) rotate(-7deg); }
    80% { transform: translate(-50%, 10px) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
    .photo-flash { animation: none; display: none; }
    .strip-card.shaking { animation: none; }
    .frame img.developing { animation: none; }
}
.strip-stamp {
    margin-top: 12px;
    padding-top: 10px;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: var(--ink);
}
.strip-card::after {
    content: "";
    display: block;
    height: 8px;
    margin-top: 2px;
    background: linear-gradient(135deg, var(--strip) 50%, transparent 50%) 0 0/10px 10px repeat-x,
                linear-gradient(-135deg, var(--strip) 50%, transparent 50%) 0 0/10px 10px repeat-x;
    background-color: var(--paper);
}

/* ---------- side calendar, revealed with the envelope ---------- */
.side-calendar {
    position: relative;
    z-index: 7;
    margin: calc(760px - min(400px, 78vw) * 2 / 3) auto 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease 0.2s, transform 0.9s ease 0.2s;
    transform: translateY(12px) rotate(3deg);
}
.side-calendar.is-in {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) rotate(3deg);
}
@media (min-width: 1150px) {
    .side-calendar {
        position: absolute;
        top: 50%;
        left: calc(100% + 40px);
        width: 280px;
        margin: 0;
        z-index: 5;
        transform: translateY(-50%) translateX(12px) rotate(3deg);
    }
    .side-calendar.is-in {
        transform: translateY(-50%) translateX(0) rotate(3deg);
    }
}
.side-calendar-card {
    max-width: 100%;
    position: relative;
    width: 280px;
    margin: 0 auto;
    background: var(--strip);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 20px 44px rgba(28,43,53,0.18);
    padding: 20px 18px 16px;
    text-align: center;
}
.side-calendar-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-deep);
    transform: translateX(-50%);
    box-shadow: 0 3px 6px rgba(28,43,53,0.3);
}
.side-calendar-month {
    font-size: 1.3rem;
    color: var(--ink);
}
.side-calendar-year {
    margin-top: 2px;
    margin-bottom: 14px;
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent-deep);
}
.side-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 8px;
    column-gap: 2px;
}
.side-calendar-dow {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    color: var(--ink-dim);
}
.side-calendar-day, .side-calendar-blank {
    font-size: 0.78rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}
.side-calendar-circled {
    position: relative;
    color: var(--accent-deep);
    font-weight: 600;
}
.side-calendar-circled::before {
    content: "";
    position: absolute;
    inset: 1px;
    border: 2px solid var(--accent-deep);
    border-radius: 50%;
}
.side-calendar-card { cursor: pointer; }
.side-calendar-card.bumped { animation: calendarBump 0.45s ease; }
@keyframes calendarBump {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.04) rotate(-1deg); }
    70% { transform: scale(0.99) rotate(0.5deg); }
}
.side-calendar-card.bumped::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,0.85) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: 120% 0;
    animation: calendarShimmer 0.75s ease-out;
    pointer-events: none;
}
@keyframes calendarShimmer {
    0% { background-position: 130% 0; opacity: 1; }
    100% { background-position: -30% 0; opacity: 0; }
}
.side-calendar-circled.pinging::after {
    content: "";
    position: absolute;
    inset: 1px;
    border: 2px solid var(--accent-deep);
    border-radius: 50%;
    animation: calendarPing 0.8s ease-out;
    pointer-events: none;
}
@keyframes calendarPing {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .side-calendar-card.bumped { animation: none; }
    .side-calendar-card.bumped::after { animation: none; display: none; }
    .side-calendar-circled.pinging::after { animation: none; }
    .side-calendar { transition-duration: 0.3s; transition-delay: 0s; }
}

/* ---------- side map, revealed with the envelope ---------- */
.side-map {
    position: relative;
    z-index: 7;
    margin: 60px auto 60px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease 0.2s, transform 0.9s ease 0.2s;
    transform: translateY(12px);
}
.side-map.is-in {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
@media (min-width: 1150px) {
    .side-map {
        position: absolute;
        top: 50%;
        right: calc(100% + 40px);
        width: 280px;
        margin: 0;
        z-index: 5;
        transform: translateY(-50%) translateX(-12px);
    }
    .side-map.is-in {
        transform: translateY(-50%) translateX(0);
    }
}
.side-map-card {
    max-width: 100%;
    position: relative;
    width: 280px;
    margin: 0 auto;
    background: var(--strip);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 20px 44px rgba(28,43,53,0.18);
    padding: 20px 18px 16px;
    text-align: center;
    transform: rotate(-3deg);
}
.side-map-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-deep);
    transform: translateX(-50%);
    box-shadow: 0 3px 6px rgba(28,43,53,0.3);
}
.side-map-card { cursor: pointer; }
.side-map-card.bumped { animation: mapCardGlow 0.6s ease; }
@keyframes mapCardGlow {
    0%, 100% { box-shadow: 0 20px 44px rgba(28,43,53,0.18); }
    40% { box-shadow: 0 20px 44px rgba(28,43,53,0.18), 0 0 0 6px rgba(47,109,144,0.28); }
}
.side-map-pin.dropping { animation: mapPinDrop 0.55s cubic-bezier(.34,1.56,.64,1); }
@keyframes mapPinDrop {
    0% { transform: translateX(-50%) translateY(0) scale(1); }
    35% { transform: translateX(-50%) translateY(6px) scale(1.2); }
    65% { transform: translateX(-50%) translateY(-3px) scale(0.92); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}
.side-map-pin.dropping::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 2px solid var(--accent-deep);
    border-radius: 50%;
    animation: mapPinRadar 0.9s ease-out;
    pointer-events: none;
}
@keyframes mapPinRadar {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .side-map-card.bumped { animation: none; }
    .side-map-pin.dropping { animation: none; }
    .side-map-pin.dropping::after { animation: none; display: none; }
}
.side-map-title {
    font-size: 1.1rem;
    color: var(--ink);
}
.side-map-sub {
    margin-top: 2px;
    margin-bottom: 12px;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-deep);
}
.side-map-embed {
    width: 100%;
    height: 260px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--panel);
}
@media (prefers-reduced-motion: reduce) {
    .side-map { transition-duration: 0.3s; transition-delay: 0s; }
}

/* ---------- revealed after the envelope opens ---------- */
#pbRest {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
#pbRest.is-in { opacity: 1; transform: translateY(0); }

.venue {
    font-size: 0.88rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-dim);
}
.venue strong { display: block; margin-top: 6px; color: var(--ink); font-size: 1.25rem; letter-spacing: 0.04em; text-transform: none; }

.divider {
    width: 100%;
    height: 1px;
    background: var(--line);
    margin: 26px auto;
}

.countdown {
    max-width: 100%;
    width: 244px;
    margin: 16px auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 14px;
    column-gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease 0.2s, transform 0.9s ease 0.2s;
    transform: translateY(12px);
}
.countdown.is-in {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .countdown { transition-duration: 0.3s; transition-delay: 0s; }
}
.countdown-unit { text-align: center; cursor: pointer; }
.countdown-num.ticking { animation: countdownTick 0.5s ease; }
@keyframes countdownTick {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); color: var(--accent-deep); }
}
@media (prefers-reduced-motion: reduce) {
    .countdown-num.ticking { animation: none; }
}
.countdown-num {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.countdown-label {
    margin-top: 4px;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-dim);
}
.countdown-married { font-style: italic; font-size: 1.3rem; color: var(--accent-deep); grid-column: 1 / -1; }

.btn-row {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.btn-pair {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}
.btn-pair .btn { width: auto; flex: 1 1 auto; }
.btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px 30px;
    font-weight: 500;
    border-radius: 30px;
    border: 1px solid var(--accent-deep);
    color: var(--accent-deep);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--accent-deep); color: var(--paper); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(28,43,53,0.2); }
.btn:active { transform: translateY(-1px); }
.btn-primary { background: var(--accent-deep); color: var(--paper); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ghost { border-color: var(--line); color: var(--ink-dim); }
.btn-ghost:hover { background: var(--panel); color: var(--ink); }
.btn-shared { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3f8a5c;
    color: #fff;
    font-size: 0.65rem;
    letter-spacing: normal;
    text-transform: none;
}
.btn-shared .btn-label-hover { display: none; }
.btn-shared:hover .btn-label-default { display: none; }
.btn-shared:hover .btn-label-hover { display: inline; }

.address-note {
    text-align: center;
    font-size: 1rem;
    color: var(--ink-dim);
    margin-top: 10px;
    margin-bottom: 15px;
}

.password-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-dim);
    margin-top: 10px;
}
.password-note code {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--panel);
    color: var(--ink);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.email-me-wrap {
    margin-top: 16px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.pb-form { margin-top: 32px; text-align: left; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--ink);
}
.required { color: #c17a7a; font-weight: 400; }
.optional { color: var(--ink-dim); font-weight: 400; }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--strip);
}
.form-control:focus { outline: none; border-color: var(--accent-deep); }
textarea.form-control { resize: vertical; font-family: inherit; }

.footnote {
    margin-top: 26px;
    font-size: 0.88rem;
    color: var(--ink-dim);
    line-height: 1.7;
}
.footnote strong { color: var(--ink); font-weight: 400; }

/* ---------- returning guest who has already submitted ---------- */
.success { text-align: center; }
.success-icon { font-size: 2.2rem; margin-bottom: 10px; }
.success p { color: var(--ink-dim); font-size: 0.95rem; margin-top: 10px; }

/* ---------- invalid / expired link ---------- */
.invalid-wrap {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}
.invalid-icon { font-size: 2.6rem; margin-bottom: 14px; }
.invalid-wrap h2 { font-size: clamp(1.8rem, 6vw, 2.4rem); color: var(--ink); margin-bottom: 12px; }
.invalid-wrap p { color: var(--ink-dim); font-size: 0.95rem; line-height: 1.7; }


.italianno-regular {
  font-family: "Italianno", cursive;
  font-weight: 400;
  font-style: normal;
  font-size: 2.6rem;
}


.leaflet-control-attribution {
    display: none;
}

/* ---------- keep the calendar/map/countdown straight on mobile ---------- */
@media (max-width: 1149px) {
    .side-calendar { transform: translateY(12px); }
    .side-calendar.is-in { transform: translateY(0); }
    .side-map-card { transform: none; }
}