/* Postvella 0.6 — image-led templates with readable, artwork-aware copy layouts. */
.lt-template-image {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.lt-template-card__stage .lt-template-card__preview {
    background: var(--card-bg) !important;
    padding: 0;
}

.lt-template-card__stage .lt-template-card__preview::before { display: none; }
.lt-template-card__preview > .lt-template-art { z-index: 0; }
.lt-template-art .lt-template-image { position: absolute; inset: 0; }

.lt-template-envelope__liner .lt-template-image {
    height: 165%;
    left: -18%;
    object-fit: cover;
    opacity: .92;
    position: absolute;
    top: -32%;
    transform: rotate(-5deg);
    width: 136%;
}

.lt-template-card__copy {
    align-items: center;
    backdrop-filter: blur(5px);
    background: color-mix(in srgb, var(--card-bg) 89%, transparent);
    border: 1px solid color-mix(in srgb, var(--card-accent) 32%, transparent);
    box-sizing: border-box;
    color: var(--card-fg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 17px 14px;
    position: absolute;
    text-align: center;
    z-index: 5;
}

.lt-template-card__copy > * { position: relative; z-index: 1; }
.lt-template-card__copy .lt-template-card__eyebrow { font-size: .52rem; line-height: 1.45; }
.lt-template-card__copy strong {
    color: var(--card-fg);
    font-family: var(--lt-serif);
    font-size: clamp(1.35rem, 2.15vw, 2.35rem);
    font-weight: 500;
    line-height: .96;
    margin-top: 12px;
    max-width: 100%;
    text-wrap: balance;
}
.lt-template-card__copy > i { background: var(--card-accent); height: 1px; margin: 11px 0; width: 38px; }
.lt-template-card__copy > small { font-size: .52rem; letter-spacing: .11em; }
@media (hover: hover) and (pointer: fine) {
    .lt-template-card__copy {
        transition: opacity 240ms ease, transform 320ms ease;
    }

    .lt-template-card .lt-template-image {
        transition: transform 520ms cubic-bezier(.2, .75, .25, 1);
    }

    .lt-template-card:hover .lt-template-card__copy {
        opacity: 0;
        pointer-events: none;
        transform: scale(.97);
    }

    .lt-template-card:hover .lt-template-image {
        transform: scale(1.018);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lt-template-card__copy,
    .lt-template-card .lt-template-image {
        transition: none;
    }
}

.lt-template-card.lt-layout--left .lt-template-card__copy {
    align-items: flex-start;
    bottom: 8%;
    left: 5%;
    min-height: 61%;
    text-align: left;
    width: 62%;
}
.lt-template-card.lt-layout--right .lt-template-card__copy {
    align-items: flex-start;
    bottom: 8%;
    min-height: 61%;
    right: 5%;
    text-align: left;
    width: 62%;
}
.lt-template-card.lt-layout--top .lt-template-card__copy {
    left: 7%;
    min-height: 42%;
    right: 7%;
    top: 6%;
}
.lt-template-card.lt-layout--bottom .lt-template-card__copy {
    bottom: 6%;
    left: 7%;
    min-height: 43%;
    right: 7%;
}
.lt-template-card.lt-layout--center .lt-template-card__copy {
    inset: 20% 8%;
}
.lt-template-card.lt-layout--panel-left .lt-template-card__copy,
.lt-template-card.lt-layout--panel-right .lt-template-card__copy {
    border-block: 0;
    bottom: 0;
    min-height: 100%;
    top: 0;
    width: 61%;
}
.lt-template-card.lt-layout--panel-left .lt-template-card__copy { border-left: 0; left: 0; }
.lt-template-card.lt-layout--panel-right .lt-template-card__copy { border-right: 0; right: 0; }
.lt-template-card.lt-layout--narrow-left .lt-template-card__copy,
.lt-template-card.lt-layout--narrow-right .lt-template-card__copy {
    align-items: flex-start;
    bottom: 7%;
    min-height: 86%;
    text-align: left;
    width: 46%;
}
.lt-template-card.lt-layout--narrow-left .lt-template-card__copy { left: 4%; }
.lt-template-card.lt-layout--narrow-right .lt-template-card__copy { right: 4%; }
.lt-template-card.lt-layout--slim-left .lt-template-card__copy,
.lt-template-card.lt-layout--slim-right .lt-template-card__copy {
    align-items: flex-start;
    bottom: 8%;
    min-height: 84%;
    text-align: left;
    width: 38%;
}
.lt-template-card.lt-layout--slim-left .lt-template-card__copy { left: 4%; }
.lt-template-card.lt-layout--slim-right .lt-template-card__copy { right: 4%; }
.lt-template-card.lt-layout--slim-left .lt-template-card__copy strong,
.lt-template-card.lt-layout--slim-right .lt-template-card__copy strong {
    font-size: clamp(1.05rem, 1.65vw, 1.65rem);
}

.lt-template-card[data-template-category="baptism"] .lt-template-card__copy {
    backdrop-filter: none;
    background: color-mix(in srgb, var(--card-bg) 97%, white);
    box-shadow: 0 8px 25px rgba(38, 49, 45, .08);
}

.lt-template-card--birthday-confetti .lt-template-card__preview > *,
.lt-template-card--birthday-milestone .lt-template-card__preview > *,
.lt-template-card--baby-modern .lt-template-card__preview > * { background: unset; }
.lt-template-card--birthday-milestone .lt-template-card__copy strong {
    background: none;
    color: var(--card-fg);
    font-family: var(--lt-serif);
    font-size: clamp(1.45rem, 2.3vw, 2.5rem);
    font-weight: 500;
    padding: 0;
}

.lt-template-card__body { padding-inline: 2px; }
.lt-template-card__body h3 { line-height: 1.08; }

/* Full invitation: the generated image is the scene, while copy stays live HTML. */
.lt-invitation.has-template-art {
    background: var(--invite-bg);
    background-image: none !important;
    padding: 0;
}
.lt-invitation.has-template-art::after { inset: 13px; z-index: 4; }
.lt-invitation.has-template-art .lt-invitation__art { inset: 0; opacity: 1; z-index: 0; }
.lt-invitation.has-template-art .lt-invitation__art .lt-template-image { position: absolute; inset: 0; }
.lt-invitation.has-template-art.has-photo .lt-invitation__art { opacity: .09; }

.lt-invitation.has-template-art .lt-invitation__inner {
    align-items: center;
    backdrop-filter: blur(7px);
    background: color-mix(in srgb, var(--invite-bg) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--invite-accent) 35%, transparent);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: clamp(22px, 5vw, 42px) clamp(20px, 4vw, 36px);
    position: absolute;
    z-index: 2;
}
.lt-invitation.has-template-art h2 {
    color: var(--invite-fg);
    font-size: clamp(2.35rem, 5vw, 4.4rem);
    line-height: .94;
    text-wrap: balance;
}
.lt-invitation.has-template-art h3 { color: var(--invite-fg); font-size: clamp(1.15rem, 2.3vw, 1.55rem); }
.lt-invitation.has-template-art .lt-invitation__eyebrow { color: var(--invite-fg); }
.lt-invitation.has-template-art dl { gap: 17px; margin-top: 18px; }
.lt-invitation.has-template-art p { line-height: 1.45; }

.lt-invitation.has-template-art.lt-layout--left .lt-invitation__inner,
.lt-invitation.has-template-art.lt-layout--right .lt-invitation__inner {
    align-items: flex-start;
    bottom: 6%;
    min-height: 88%;
    text-align: left;
    top: 6%;
    width: 59%;
}
.lt-invitation.has-template-art.lt-layout--left .lt-invitation__inner { left: 5%; }
.lt-invitation.has-template-art.lt-layout--right .lt-invitation__inner { right: 5%; }
.lt-invitation.has-template-art.lt-layout--left .lt-invitation__rule,
.lt-invitation.has-template-art.lt-layout--right .lt-invitation__rule { align-self: flex-start; }

.lt-invitation.has-template-art.lt-layout--top .lt-invitation__inner,
.lt-invitation.has-template-art.lt-layout--bottom .lt-invitation__inner {
    left: 6%;
    min-height: 48%;
    right: 6%;
}
.lt-invitation.has-template-art.lt-layout--top .lt-invitation__inner { top: 5%; }
.lt-invitation.has-template-art.lt-layout--bottom .lt-invitation__inner { bottom: 5%; }
.lt-invitation.has-template-art.lt-layout--center .lt-invitation__inner { inset: 12% 9%; }

.lt-invitation.has-template-art.lt-layout--panel-left .lt-invitation__inner,
.lt-invitation.has-template-art.lt-layout--panel-right .lt-invitation__inner {
    backdrop-filter: none;
    background: color-mix(in srgb, var(--invite-bg) 97%, white);
    bottom: 0;
    min-height: 100%;
    top: 0;
    width: 59%;
}
.lt-invitation.has-template-art.lt-layout--panel-left .lt-invitation__inner { border-left: 0; left: 0; }
.lt-invitation.has-template-art.lt-layout--panel-right .lt-invitation__inner { border-right: 0; right: 0; }
.lt-invitation.has-template-art.lt-layout--narrow-left .lt-invitation__inner,
.lt-invitation.has-template-art.lt-layout--narrow-right .lt-invitation__inner {
    align-items: flex-start;
    bottom: 5%;
    min-height: 90%;
    text-align: left;
    top: 5%;
    width: 46%;
}
.lt-invitation.has-template-art.lt-layout--narrow-left .lt-invitation__inner { left: 4%; }
.lt-invitation.has-template-art.lt-layout--narrow-right .lt-invitation__inner { right: 4%; }
.lt-invitation.has-template-art.lt-layout--narrow-left .lt-invitation__rule,
.lt-invitation.has-template-art.lt-layout--narrow-right .lt-invitation__rule { align-self: flex-start; }
.lt-invitation.has-template-art.lt-layout--slim-left .lt-invitation__inner,
.lt-invitation.has-template-art.lt-layout--slim-right .lt-invitation__inner {
    align-items: flex-start;
    bottom: 5%;
    min-height: 90%;
    text-align: left;
    top: 5%;
    width: 38%;
}
.lt-invitation.has-template-art.lt-layout--slim-left .lt-invitation__inner { left: 4%; }
.lt-invitation.has-template-art.lt-layout--slim-right .lt-invitation__inner { right: 4%; }
.lt-invitation.has-template-art.lt-layout--slim-left .lt-invitation__rule,
.lt-invitation.has-template-art.lt-layout--slim-right .lt-invitation__rule { align-self: flex-start; }
.lt-invitation.has-template-art.lt-layout--slim-left h2,
.lt-invitation.has-template-art.lt-layout--slim-right h2 {
    font-size: clamp(1.9rem, 3.6vw, 3.4rem);
}

.lt-invitation.has-template-art[class*="baptism-"] .lt-invitation__inner {
    backdrop-filter: none;
    background: color-mix(in srgb, var(--invite-bg) 97%, white);
    box-shadow: 0 12px 32px rgba(32, 48, 45, .1);
}

/* Template selector uses the same real image instead of an Aa placeholder. */
.lt-template-choice span > .lt-template-image {
    inset: 0;
    object-fit: cover;
    position: absolute;
    z-index: 0;
}
.lt-template-choice span > b {
    background: color-mix(in srgb, var(--choice-bg) 90%, transparent);
    border: 1px solid color-mix(in srgb, var(--choice-accent) 38%, transparent);
    padding: 4px 7px;
    position: relative;
    z-index: 2;
}

@media (max-width: 780px) {
    .lt-invitation.has-template-art { min-height: 690px; }
    .lt-invitation.has-template-art .lt-invitation__inner,
    .lt-invitation.has-template-art.lt-layout--left .lt-invitation__inner,
    .lt-invitation.has-template-art.lt-layout--right .lt-invitation__inner,
    .lt-invitation.has-template-art.lt-layout--panel-left .lt-invitation__inner,
    .lt-invitation.has-template-art.lt-layout--panel-right .lt-invitation__inner {
        align-items: center;
        bottom: 4%;
        left: 4%;
        min-height: 54%;
        right: 4%;
        text-align: center;
        top: auto;
        width: auto;
    }
    .lt-invitation.has-template-art .lt-invitation__rule { align-self: center !important; }
}



/* Template library refinements — v0.15.15 */
.lt-template-card{border-radius:var(--lt-radius);box-shadow:0 8px 24px rgba(25,43,36,.045);transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.lt-template-card:hover{border-color:rgba(23,59,50,.2);box-shadow:0 20px 48px rgba(25,43,36,.12);transform:translateY(-5px)}
.lt-template-card__body{gap:15px;min-height:84px}
.lt-template-card__body>div{min-width:0}
.lt-template-card__body h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lt-template-card__view{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;border:1px solid rgba(23,59,50,.18);border-radius:50%;color:var(--lt-forest);font-size:1rem;transition:background .2s ease,color .2s ease,transform .2s ease}
.lt-template-card:hover .lt-template-card__view{background:var(--lt-forest);color:#fff;transform:translate(2px,-2px)}
@media(hover:none){.lt-template-card:active{transform:scale(.992)}.lt-template-card__view{background:#eef2ee}}

