/* =========================================================
   LAYOUT L3 — Romántico Premium / Social Ceremonial
========================================================= */

body[data-template].layout-l3 .layout-l3-classic {
    min-height: 100vh;
    padding: 26px 0 92px;
}

body[data-template].layout-l3 .l3-invite {
    width: min(calc(100% - 28px), 430px);
    margin: 0 auto;
    padding: 18px 18px 30px;
    text-align: center;
    background: transparent;
}

body[data-template].layout-l3 .l3-content {
    position: relative;
    max-width: 380px;
    margin: 0 auto;
    padding: 38px 30px 42px;
    isolation: isolate;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.75),
        0 0 10px rgba(255,255,255,0.55);
}

body[data-template].layout-l3 .l3-content::before,
body[data-template].layout-l3 .l3-content::after {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 99px;
    opacity: 0.75;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        color-mix(in srgb, var(--template-accent, #d9a65a) 84%, transparent) 18%,
        color-mix(in srgb, var(--template-accent, #d9a65a) 54%, transparent) 50%,
        color-mix(in srgb, var(--template-accent, #d9a65a) 84%, transparent) 82%,
        transparent 100%
    );
    z-index: -1;
}

body[data-template].layout-l3 .l3-content::before {
    left: 2px;
}

body[data-template].layout-l3 .l3-content::after {
    right: 2px;
}

/* Header */

body[data-template].layout-l3 .l3-kicker {
    margin: 0 auto 14px;
    color: var(--template-primary, #c85f8a);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    opacity: 0.9;
}

body[data-template].layout-l3 .l3-intro {
    width: 88%;
    max-width: 280px;
    margin: 0 auto 16px;
    color: var(--template-text, #2d2723);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.46;
}

body[data-template].layout-l3 .l3-names {
    max-width: 100%;
    margin: 0 auto 18px;
    color: var(--template-primary, #c85f8a);
    font-family: var(--font-title, Georgia, serif);
    font-size: clamp(3.05rem, 12vw, 4.2rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
    overflow-wrap: break-word;
}

/* Photo */

body[data-template].layout-l3 .l3-photo {
    width: min(72%, 245px);
    margin: 0 auto 22px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 999px 999px 34px 34px;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--template-accent, #d9a65a) 38%, transparent),
        0 18px 42px rgba(45, 39, 35, 0.18);
}

body[data-template].layout-l3 .l3-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Date */

body[data-template].layout-l3 .l3-date-split {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 24px auto 18px;
    border-top: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 42%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 42%, transparent);
}

body[data-template].layout-l3 .l3-date-split > div {
    padding: 13px 8px 15px;
}

body[data-template].layout-l3 .l3-date-split > div + div {
    border-left: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 34%, transparent);
}

body[data-template].layout-l3 .l3-date-split small,
body[data-template].layout-l3 .l3-location-item small,
body[data-template].layout-l3 .l3-family-item small,
body[data-template].layout-l3 .l3-guest-box span {
    display: block;
    margin-bottom: 6px;
    color: var(--template-primary, #c85f8a);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body[data-template].layout-l3 .l3-date-split strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title, Georgia, serif);
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.05;
}

/* Locations */

body[data-template].layout-l3 .l3-locations {
    display: grid;
    gap: 13px;
    margin-top: 17px;
}

body[data-template].layout-l3 .l3-location-item strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title, Georgia, serif);
    font-size: 1.18rem;
    font-weight: 500;
    line-height: 1.12;
}

body[data-template].layout-l3 .l3-location-item span {
    display: block;
    width: 88%;
    margin: 4px auto 0;
    color: var(--template-text, #2d2723);
    opacity: 0.76;
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.84rem;
    line-height: 1.42;
}

/* Short CTA */

body[data-template].layout-l3 .l3-short {
    width: 92%;
    margin: 22px auto 0;
    padding: 12px 14px;
    color: var(--template-primary, #c85f8a);
    font-family: var(--font-title, Georgia, serif);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.22;
    text-align: center;
    border-top: 1px solid color-mix(in srgb, var(--template-accent, #d9a65a) 36%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--template-accent, #d9a65a) 36%, transparent);
}

/* Family */

body[data-template].layout-l3 .l3-family {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid color-mix(in srgb, var(--template-accent, #d9a65a) 42%, transparent);
}

body[data-template].layout-l3 .l3-family-item {
    margin-bottom: 14px;
}

body[data-template].layout-l3 .l3-family-item strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title, Georgia, serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.24;
}

body[data-template].layout-l3 .l3-family p {
    width: 92%;
    margin: 13px auto 0;
    color: var(--template-text, #2d2723);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.84rem;
    line-height: 1.42;
}

/* Guest */

body[data-template].layout-l3 .l3-guest-box {
    width: 92%;
    margin: 22px auto 0;
    padding: 14px 16px;
    text-align: center;
    border-top: 1px solid color-mix(in srgb, var(--template-accent, #d9a65a) 42%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--template-accent, #d9a65a) 42%, transparent);
}

body[data-template].layout-l3 .l3-guest-box strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title, Georgia, serif);
    font-size: 1.28rem;
    font-weight: 500;
    line-height: 1.18;
}

/* Action */

body[data-template].layout-l3 .l3-action {
    margin: 24px auto 0;
    padding: 0;
    text-align: center;
}

body[data-template].layout-l3 .l3-countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 18px;
    border-top: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 30%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 30%, transparent);
}

body[data-template].layout-l3 .l3-countdown > div {
    padding: 9px 4px;
}

body[data-template].layout-l3 .l3-countdown > div + div {
    border-left: 1px solid color-mix(in srgb, var(--template-text, #2d2723) 24%, transparent);
}

body[data-template].layout-l3 .l3-countdown strong {
    display: block;
    color: var(--template-text, #2d2723);
    font-family: var(--font-title, Georgia, serif);
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1;
}

body[data-template].layout-l3 .l3-countdown span {
    display: block;
    margin-top: 4px;
    color: var(--template-text, #2d2723);
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body[data-template].layout-l3 .l3-rsvp-button {
    width: 92%;
    min-height: 50px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--template-primary, #c85f8a) 70%, #ffffff);
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--template-primary, #c85f8a) 92%, #ffffff),
        color-mix(in srgb, var(--template-primary, #c85f8a) 72%, #7b314d)
    );
    color: #fffaf7;
    box-shadow:
        0 12px 28px rgba(200, 95, 138, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body[data-template].layout-l3 .l3-rsvp-note {
    margin: 12px 0 0;
    color: var(--template-text, #2d2723);
    font-size: 0.5rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}

/* Mobile */

@media (max-width: 480px) {
    body[data-template].layout-l3 .layout-l3-classic {
        padding-top: 18px;
        padding-bottom: 92px;
    }

    body[data-template].layout-l3 .l3-invite {
        padding: 14px 16px 24px;
    }

    body[data-template].layout-l3 .l3-content {
        max-width: 304px;
        padding: 28px 22px 28px;
    }

    body[data-template].layout-l3 .l3-content::before,
    body[data-template].layout-l3 .l3-content::after {
        width: 2px;
        top: 18px;
        bottom: 18px;
        background: var(--template-accent, #d9a65a);
    }

    body[data-template].layout-l3 .l3-content::before {
        left: -8px;
    }

    body[data-template].layout-l3 .l3-content::after {
        right: -8px;
    }

    body[data-template].layout-l3 .l3-kicker {
        font-size: 0.76rem;
        letter-spacing: 0.22em;
        margin-bottom: 12px;
    }

    body[data-template].layout-l3 .l3-intro {
        width: 100%;
        font-size: 0.86rem;
        margin-bottom: 16px;
    }

    body[data-template].layout-l3 .l3-names {
        font-size: clamp(2.7rem, 12vw, 3.45rem);
        line-height: 1.06;
        margin-bottom: 18px;
    }

    body[data-template].layout-l3 .l3-photo {
        width: min(70%, 188px);
        margin-bottom: 18px;
    }

    body[data-template].layout-l3 .l3-date-split {
        margin: 20px auto 16px;
    }

    body[data-template].layout-l3 .l3-date-split strong {
        font-size: 1.08rem;
    }

    body[data-template].layout-l3 .l3-location-item strong {
        font-size: 1.04rem;
        line-height: 1.18;
    }

    body[data-template].layout-l3 .l3-location-item span {
        width: 92%;
        font-size: 0.84rem;
    }

    body[data-template].layout-l3 .l3-short {
        width: 94%;
        margin-top: 20px;
        font-size: 1.05rem;
    }

    body[data-template].layout-l3 .l3-family-item strong {
        font-size: 1rem;
    }

    body[data-template].layout-l3 .l3-guest-box {
        width: 94%;
        margin-top: 22px;
        padding: 13px 12px;
    }

    body[data-template].layout-l3 .l3-guest-box strong {
        font-size: 1.12rem;
    }

    body[data-template].layout-l3 .l3-countdown strong {
        font-size: 1.25rem;
    }

    body[data-template].layout-l3 .l3-action {
        margin-bottom: 22px;
    }
}