/*
 * Voan Trắng (template 14): white feather/satin wedding invitation.
 * Mobile-only canvas centred on desktop. Charcoal text on a veiled feather texture;
 * the palette colour carries the script titles, "and" flourish, pills, heart and links.
 * Decorations are neutral (feather, cream envelope) or masks taking the palette colour.
 */
body.wedding-invitation { background: #e9e6e1; }
.wedding-invitation .page-wrapper { max-width: 480px; margin-inline: auto; background: #f7f5f1; }
.wedding-invitation .bgr-main-fixed { display: none; }

.invitation-14, .vt-intro, .vt-modal {
    --accent: var(--invitation-accent, #907053);
    --accent-ink: var(--accent);
    --ink: #2b2725;
    --ink-soft: #5c5550;
    --paper: #f7f5f1;
    --script: "Pinyon Script", "Times New Roman", cursive;
    --serif: "Cormorant Upright", "Cormorant Garamond", Georgia, serif;
    --sans: "Be Vietnam Pro", Roboto, Arial, sans-serif;
}
/* Small accent text keeps 4.5:1 on the light background for the lighter palettes. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
    .invitation-14, .vt-intro, .vt-modal { --accent-ink: color-mix(in srgb, var(--accent) 80%, #000); }
}
.invitation-14 {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(rgb(247 245 241 / .76), rgb(247 245 241 / .76)),
        url("../images/feather.webp") center top / 100% auto repeat-y,
        var(--paper);
    color: var(--ink);
    font: 400 16px/1.7 var(--sans);
    text-align: center;
}
.invitation-14 * { box-sizing: border-box; }
/* Zero-specificity reset: the global p/h rules (14px on mobile, heading colour) must not win over the design classes. */
.invitation-14 :where(h1, h2, h3, p, figure) { margin: 0; color: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-family: inherit; }
.invitation-14 :where(p) { text-wrap: pretty; }
.invitation-14 :is(h1, h2, h3, p, a, strong, span) { overflow-wrap: anywhere; }
.invitation-14 img { max-width: 100%; height: auto; }
.vt-intro-date { font-variant-numeric: lining-nums; }

/* "and" flourish from the reference, recoloured with the palette through a mask. */
.vt-and {
    display: inline-block;
    width: 82px;
    height: 32px;
    margin-right: 6px;
    vertical-align: -3px;
    background: var(--accent);
    -webkit-mask: url("../images/and.webp") center / contain no-repeat;
    mask: url("../images/and.webp") center / contain no-repeat;
}

/* Opening card (shown by js/main.js only) */
.page-wrapper .vt-intro.tsc-card-fixed { max-width: 480px; }
.vt-intro {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f4f1eb url("../images/feather.webp") center top / cover;
    color: var(--ink);
    cursor: pointer;
    transition: opacity 1s cubic-bezier(.22, 1, .36, 1), visibility 1s ease;
}
.vt-intro[hidden] { display: none; }
.vt-intro-frame { padding: 0 20px; text-align: center; transition: transform 1s cubic-bezier(.22, 1, .36, 1), opacity 1s ease, filter 1s ease; }
.vt-intro-save { margin: 0; font: 600 25px/1.3 var(--serif); letter-spacing: 6px; text-transform: uppercase; opacity: 0; }
.vt-intro-save em { margin: 0 8px; font: 400 30px/1 var(--script); letter-spacing: 0; text-transform: none; color: var(--accent-ink); }
.vt-intro.is-ready .vt-intro-save { animation: vt-fade-down .9s cubic-bezier(.22, 1, .36, 1) forwards; }
.vt-intro-date { min-height: 40px; margin: 18px 0 0; font: 600 30px/1.3 var(--serif); letter-spacing: 4px; }
.vt-intro-cursor { display: inline-block; width: 1px; height: 28px; margin-left: 5px; vertical-align: -3px; background: var(--ink); opacity: 0; }
.vt-intro.is-typing .vt-intro-cursor { animation: vt-blink .8s ease-in-out infinite; }
.vt-intro.is-closing { opacity: 0; visibility: hidden; pointer-events: none; }
.vt-intro.is-closing .vt-intro-frame { transform: scale(1.3); opacity: 0; filter: blur(2px); }
html.vt-intro-open, html.vt-intro-open body { overflow: hidden; }

/* Cover: full-bleed photo fading into the paper */
.vt-cover { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 0 22px 44px; }
/* Definite width: min-height must not widen the cover through its aspect ratio on narrow screens. */
.vt-cover-with-photo { width: 100%; min-height: 620px; aspect-ratio: 39 / 76; }
.vt-cover-empty { justify-content: center; min-height: 600px; padding-top: 60px; }
.vt-cover-photo { position: absolute; inset: 0; margin: 0; }
.vt-cover-photo img { display: block; width: 100%; height: 100% !important; object-fit: cover; object-position: center 22%; -webkit-mask-image: linear-gradient(180deg, #000 48%, rgb(0 0 0 / .4) 70%, transparent 90%); mask-image: linear-gradient(180deg, #000 48%, rgb(0 0 0 / .4) 70%, transparent 90%); }
.vt-cover-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(247 245 241 / 0) 52%, rgb(247 245 241 / .55) 72%, rgb(247 245 241 / 0) 100%); }
.vt-cover-copy { position: relative; z-index: 1; text-shadow: 0 0 14px rgb(255 255 255 / .85); }
.vt-save { font: 600 21px/1.3 var(--serif); letter-spacing: 5px; text-transform: uppercase; }
.vt-save em { margin: 0 6px; font: 400 26px/1 var(--script); letter-spacing: 0; text-transform: none; color: var(--accent-ink); }
.vt-cover-names { margin-top: 26px !important; font: 600 34px/1.25 var(--serif); letter-spacing: 1.5px; text-transform: uppercase; }
.invitation-14 .vt-cover-names > span[data-aos] { display: block; }
.vt-cover-groom { padding-right: 34px; }
.vt-cover-bride { padding-left: 24px; }
.vt-monogram { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; width: 190px; height: 190px; margin: 0 auto 40px; border: 1px solid var(--accent); border-radius: 50%; box-shadow: 0 0 0 8px rgb(255 255 255 / .55), 0 0 0 9px rgb(0 0 0 / .08); color: var(--accent-ink); }
.vt-monogram span { font: 400 64px/1 var(--script); }
.vt-monogram i { font: 500 26px/1 var(--serif); color: var(--ink-soft); }

/* Families */
.vt-families { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 40px 22px 6px; }
.vt-family-groom { text-align: left; }
.vt-family-bride { text-align: right; }
.vt-family-label { margin-bottom: 4px !important; font: 400 30px/1.3 var(--script); color: var(--accent-ink); }
.vt-parent { font: 700 18px/1.45 var(--serif); letter-spacing: .2px; }
.vt-family-address { margin-top: 4px !important; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* Bride and groom */
.vt-couple { padding: 38px 26px 0; text-align: left; }
.vt-kicker { font: 600 16px/1.5 var(--serif); letter-spacing: 1.4px; text-transform: uppercase; text-wrap: balance; color: var(--ink-soft); }
.vt-fullname { font: 500 40px/1.2 var(--serif); }
.vt-couple .vt-kicker { margin-bottom: 10px !important; }
.vt-and-lg { display: block; width: 104px; height: 40px; margin: 6px 0 4px; }
.vt-framed { margin: 34px -12px 0; padding: 8px; background: #fff; box-shadow: 0 16px 32px rgb(40 30 20 / .18); }
.vt-framed img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 35%; }

/* Invitation of the guest */
.vt-invite { padding: 46px 24px 6px; }
.invitation-14 .guest-name {
    display: inline-block;
    max-width: 100%;
    margin-top: 6px;
    font: 400 34px/1.5 var(--script);
    color: var(--accent-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 9px;
}
.vt-rule { display: block; width: 128px; height: 1px; margin: 22px auto 0; background: rgb(43 39 37 / .35); }

/* Ceremony and reception */
.vt-events { padding: 34px 20px 0; }
.invitation-14 .vt-pill {
    display: inline-block;
    max-width: 100%;
    padding: 8px clamp(18px, 6vw, 28px);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 16px rgb(40 30 20 / .16);
    font: 600 clamp(17px, 5.3vw, 22px)/1.3 var(--serif);
    letter-spacing: .6px;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--accent-ink);
}
.vt-ceremony { margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px dashed rgb(43 39 37 / .35); }
.vt-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 340px; margin: 22px auto 0; }
.vt-when > div + div { border-left: 1px solid rgb(43 39 37 / .6); }
.vt-when span { display: block; color: var(--ink-soft); }
.vt-when strong { display: block; margin-top: 4px; font: 700 24px/1.3 var(--serif); font-variant-numeric: lining-nums; }
.vt-lunar { margin-top: 12px !important; font-size: 15px; font-style: italic; color: var(--ink-soft); }
.vt-place { margin-top: 14px !important; font-size: 17px; font-weight: 600; }
.vt-address { margin-top: 2px !important; font-size: 15px; color: var(--ink-soft); }
.vt-time-line { margin-top: 20px !important; font-size: 16px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.vt-big-date { margin-top: 6px !important; font: 700 34px/1.3 var(--serif); letter-spacing: 2px; font-variant-numeric: lining-nums; color: var(--accent-ink); }
.vt-big-date span { margin: 0 4px; font-weight: 500; color: rgb(43 39 37 / .45); }
.vt-venue { margin-top: 18px !important; font-size: 17px; font-weight: 600; line-height: 1.5; letter-spacing: .5px; text-transform: uppercase; text-wrap: balance; }
.vt-map-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 24px;
    padding: 8px 24px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 0 rgb(43 39 37 / .85);
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.vt-map-button:hover, .vt-map-button:focus-visible { background: var(--accent); color: #fff; transform: translateY(2px); box-shadow: 0 2px 0 rgb(43 39 37 / .85); }
.vt-map-button:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 4px; }
.vt-map { display: block; width: calc(100% + 40px); max-width: none; height: 260px; margin: 30px -20px 0; border: 0; background: #e9e6e1; }

/* Calendar */
.vt-calendar { padding: 44px 24px 34px; }
.vt-calendar-card { max-width: 380px; margin: 0 auto; padding: 14px 18px 12px; border: 1px solid var(--ink); border-radius: 6px; background: rgb(255 255 255 / .78); }
.vt-calendar-title { font: 400 34px/1.35 var(--script); color: var(--accent); }
.vt-calendar table { width: 100%; margin-top: 8px; table-layout: fixed; border-collapse: collapse; font-size: 15px; }
.vt-calendar th { padding: 8px 0; border-block: 1px solid rgb(43 39 37 / .55); font-size: 14px; font-weight: 600; }
.vt-calendar th:last-child, .vt-calendar td:last-child { font-weight: 600; }
.vt-calendar tbody tr:first-child td { padding-top: 8px; }
.vt-calendar tbody tr:last-child td { padding-bottom: 8px; border-bottom: 1px solid rgb(43 39 37 / .55); }
.vt-calendar td { height: 40px; padding: 0; }
.vt-calendar td span { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.vt-calendar td[aria-current] span { font-weight: 700; color: var(--accent-ink); }
.vt-calendar td[aria-current] span::before {
    content: "";
    position: absolute;
    inset: -5px -7px -3px;
    background: var(--accent);
    -webkit-mask: url("../images/heart.webp") center / contain no-repeat;
    mask: url("../images/heart.webp") center / contain no-repeat;
    animation: vt-heart 3.4s ease-in-out infinite;
}

/* RSVP */
.vt-rsvp { padding: 30px 20px 40px; scroll-margin-top: 20px; }
.vt-script-title { font: 400 42px/1.35 var(--script); color: var(--accent); }
.vt-rsvp .vt-rule { margin: 8px auto 14px; background: var(--accent); }
.vt-rsvp-intro { margin-bottom: 20px !important; color: var(--ink-soft); }
.vt-rsvp form { text-align: left; }
.vt-rsvp label, .vt-rsvp legend { font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--ink); }
.vt-rsvp :is(input.form-control, textarea, select) { min-height: 48px; padding: 10px 20px; border: 1px solid rgb(43 39 37 / .55); border-radius: 24px; background: rgb(255 255 255 / .88); font-size: 16px; color: var(--ink); }
.vt-rsvp textarea { border-radius: 20px; }
.vt-rsvp :is(input.form-control, textarea, select):focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(0 0 0 / .07); }
.vt-rsvp legend { margin-bottom: 6px; }
.vt-rsvp .form-check { display: flex; align-items: center; gap: 10px; min-height: 40px; padding-left: 0; }
.vt-rsvp .form-check-input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; border: 1.5px solid rgb(43 39 37 / .6); }
.vt-rsvp .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.vt-rsvp .form-check-label { font-size: 15px; font-weight: 400; }
.vt-rsvp #number-guest { margin-top: 10px; }
.vt-button {
    min-height: 50px;
    padding: 10px 24px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--ink), 0 8px 16px rgb(0 0 0 / .16);
    color: var(--ink);
    font: 600 16px/1.4 var(--sans);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
}
.vt-button:hover, .vt-button:focus-visible { background: var(--accent); color: #fff; }
.vt-button:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 6px; }
.invitation-14 .invitation-wishes { margin-top: 26px; padding: 4px 16px; border-radius: 18px; background: rgb(255 255 255 / .72); box-shadow: 0 8px 20px rgb(40 30 20 / .08); text-align: left; }

/* Gift box: one button opening the shared QR modal */
.vt-gift { padding: 10px 24px 46px; }
.vt-gift-intro { max-width: 320px; margin: 0 auto 18px !important; color: var(--ink-soft); }
.vt-gift-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(100%, 200px);
    padding: 18px 14px 14px;
    border: 1px solid rgb(43 39 37 / .08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 26px rgb(40 30 20 / .18);
    color: var(--ink);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
    -webkit-tap-highlight-color: transparent;
}
.vt-gift-box:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgb(40 30 20 / .22); }
.vt-gift-box:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 4px; }
.invitation-14 .vt-envelope-wrap { display: block; }
.vt-envelope { display: block; width: 120px; transform-origin: 50% 80%; animation: vt-envelope 5.4s ease-in-out 1.5s infinite; }
.invitation-14 .vt-gift-label { display: block; font: 600 18px/1.4 var(--serif); letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }

/* Album: balanced two-column masonry */
.vt-album { padding: 0 12px 34px; }
.vt-gallery { columns: 2; column-gap: 8px; }
.vt-gallery-single { columns: 1; max-width: 80%; margin: 0 auto; }
.vt-shot { display: block; margin-bottom: 8px; overflow: hidden; background: #e9e6e1; break-inside: avoid; }
.vt-shot img { display: block; width: 100%; height: auto; object-fit: cover; object-position: center 30%; }
.vt-shot-tall img { aspect-ratio: 2 / 3; }
.vt-shot-portrait img { aspect-ratio: 3 / 4; }
.vt-shot-wide img { aspect-ratio: 4 / 3; }

/* Thank you: always the last block */
.vt-closing { position: relative; padding: 26px 26px 96px; }
.vt-closing-photo { position: relative; margin: 0 -26px 26px !important; overflow: hidden; }
.vt-closing-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; }
.vt-closing-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(247 245 241 / 0) 60%, rgb(247 245 241 / .9) 92%, rgb(247 245 241)); }
.vt-closing-message { max-width: 340px; margin: 0 auto !important; font: 600 21px/1.6 var(--serif); }
.vt-closing-message-script { max-width: 320px; font: 400 33px/1.45 var(--script); text-wrap: balance; color: var(--accent-ink); }

/* Shared gift modal */
.vt-modal { color: #2b2725; font: 16px/1.7 "Be Vietnam Pro", Roboto, Arial, sans-serif; }
.vt-modal #modalQr .modal-content { padding-top: 30px; border-radius: 14px; background: #fbfaf7; }
.vt-modal .qr-code-wrapper .button-wrap { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.vt-modal .qr-code-wrapper .pill-indicator { display: none; }
.vt-modal .qr-code-wrapper .pill-btn { min-height: 44px; border: 1px solid var(--accent); color: var(--accent-ink); }
.vt-modal .qr-code-wrapper .pill-btn.active { background: var(--accent); color: #fff; }
.vt-modal .qr-code-wrapper .qr-block { display: none; width: 100%; min-width: 0; text-align: center; }
.vt-modal .qr-code-wrapper .qr-block.index-0 { display: block; }
.vt-modal .qr-code-wrapper .name { margin: 8px 0 15px; font-weight: 600; }
.vt-modal .qr-code-wrapper .bank-info { overflow-wrap: anywhere; }
.vt-modal .qr-code-wrapper .copy-stk { min-height: 44px; border-color: var(--accent); background: var(--accent); color: #fff; }

/* Entrance: the cover photo settles from a slight zoom (custom AOS "vt-settle"). */
.invitation-14 [data-aos="vt-settle"] { transition-property: transform; }
body[data-aos-easing] .invitation-14 [data-aos="vt-settle"] { transform: scale(1.08); }
body[data-aos-easing] .invitation-14 [data-aos="vt-settle"].aos-animate { transform: none; }
/* While the opening card is shown, the cover waits so its entrance plays as the card zooms away. */
html.vt-intro-open .vt-cover [data-aos].aos-animate { opacity: 0; }
html.vt-intro-open .vt-cover [data-aos="fade-down"].aos-animate { transform: translate3d(0, -100px, 0); }
html.vt-intro-open .vt-cover [data-aos="fade-right"].aos-animate { transform: translate3d(-100px, 0, 0); }
html.vt-intro-open .vt-cover [data-aos="fade-left"].aos-animate { transform: translate3d(100px, 0, 0); }
html.vt-intro-open .vt-cover [data-aos="zoom-in"].aos-animate { transform: scale(.6); }
html.vt-intro-open .vt-cover [data-aos="vt-settle"].aos-animate { opacity: 1; transform: scale(1.08); }

@keyframes vt-fade-down { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes vt-blink { 0%, 35% { opacity: 1; } 65%, 100% { opacity: 0; } }
@keyframes vt-heart { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(1.12); } }
@keyframes vt-envelope {
    0%, 60%, 100% { transform: translateY(0) rotate(0); }
    66% { transform: translateY(-5px) rotate(-4deg); }
    72% { transform: translateY(-5px) rotate(4deg); }
    78% { transform: translateY(-2px) rotate(-2deg); }
    84% { transform: translateY(0) rotate(0); }
}

@media (max-width: 359px) {
    .vt-cover { padding-inline: 16px; }
    .vt-save { font-size: 19px; letter-spacing: 4px; }
    .vt-cover-names { font-size: 29px; }
    .vt-cover-groom { padding-right: 20px; }
    .vt-cover-bride { padding-left: 12px; }
    .vt-families { padding-inline: 16px; gap: 12px; }
    .vt-parent { font-size: 17px; }
    .vt-couple { padding-inline: 20px; }
    .vt-fullname { font-size: 35px; }
    .vt-big-date { font-size: 30px; }
    .vt-calendar { padding-inline: 16px; }
    .vt-calendar-card { padding-inline: 12px; }
    .vt-rsvp { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .invitation-14 *, .invitation-14 *::before, .invitation-14 *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .invitation-14 [data-aos] { opacity: 1 !important; transform: none !important; }
    .vt-intro { display: none !important; }
}
body:not([data-aos-easing]) .invitation-14 [data-aos] { opacity: 1; transform: none; }
