:root {
    /* Bảng màu chỉ định: đỏ son (nhấn mạnh) · vàng đồng/vàng kim (nhấn) · kem (nền 60%) · nâu (chữ) */
    --red: #B71C1C;
    --gold-deep: #C9A24B;
    --cream: #FDF6E3;
    --brown: #7A5C3E;
    --gold: #E0A526;
    --ink: #4a3324;
    --maroon: #3B0F0C;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--brown);
    overflow-x: hidden;
    font-family: 'Be Vietnam Pro', sans-serif;
}

section {
    padding: 70px 20px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

img {
    max-width: 100%;
    display: block;
}

/* ---- typography roles: script = tên/cảm xúc · serif = tiêu đề/thân · sans = thực dụng ---- */
.script {
    font-family: 'Dancing Script', cursive;
}

.serif {
    font-family: 'Playfair Display', serif;
}

.sans {
    font-family: 'Be Vietnam Pro', sans-serif;
}

h2.section-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(26px, 6vw, 34px);
    color: var(--red);
    margin: 0 0 8px;
    letter-spacing: .5px;
}

.eyebrow {
    text-align: center;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin: 0 0 38px;
    font-weight: 500;
}

.divider {
    width: 48px;
    height: 2px;
    background: var(--gold);
    margin: 14px auto 34px;
    border: none;
}

.ph {
    background: #f2e6c9;
    color: var(--brown);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid rgba(201, 162, 75, .4);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    border: 1px solid var(--red);
    color: var(--red);
    text-decoration: none;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    background: transparent;
}

.btn.solid {
    background: var(--red);
    color: var(--cream);
    border-color: var(--red);
}

/* ---------- 1. HERO ---------- */
#hero {
    min-height: 100vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    padding: 0 20px 56px;
    color: var(--cream);
    background:
        linear-gradient(180deg, rgba(58, 15, 12, .15) 0%, rgba(40, 10, 8, .55) 55%, rgba(30, 6, 5, .88) 100%),
        url('image/6FD6300D-7AF9-4FE5-AF0F-AACAA76644EF.webp');
    background-size: cover;
    background-position: center 20%;
    animation: kenburns 20s ease-in-out infinite alternate;
}

@keyframes kenburns {
    from {
        background-size: cover;
        background-position: center 20%;
    }

    to {
        background-size: 115%;
        background-position: center 28%;
    }
}

#hero .eyebrow-hero {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
}

#hero h1 {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: clamp(40px, 12vw, 80px);
    margin: .15em 0;
    line-height: 1.15;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .4);
    opacity: 0;
    animation: writeIn 1.3s .3s ease forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .05em;
}

#hero h1 .name {
    display: block;
    max-width: 90vw;
}

@keyframes writeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero .amp {
    color: var(--gold);
    font-size: .5em;
    line-height: 1;
    margin: -.1em 0;
}

#hero .date-line {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 16px;
    letter-spacing: 2px;
    color: #f3e6c8;
}

#hero .scroll-hint {
    margin-top: 36px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: .75;
}

/* ---------- 2. COUNTDOWN ---------- */
#countdown {
    text-align: center;
}

/* khung bao quanh cả khối đếm ngược, góc trang trí vàng như timeline để gom mắt nhìn */
.cd-frame {
    position: relative;
    display: inline-block;
    padding: 28px clamp(14px, 5vw, 34px) 22px;
    background: rgba(247, 236, 211, .55);
    border: 1px solid rgba(201, 162, 75, .4);
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(74, 51, 36, .14);
}

.cd-frame::before,
.cd-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold);
    pointer-events: none;
}

.cd-frame::before {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
}

.cd-frame::after {
    bottom: -2px;
    right: -2px;
    border-left: 0;
    border-top: 0;
}

#countdown .row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(6px, 2vw, 14px);
    flex-wrap: nowrap;
}

.cd-sep {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 6vw, 34px);
    color: var(--gold-deep);
    margin-bottom: 22px;
}

.flip {
    position: relative;
    width: clamp(56px, 15vw, 74px);
    height: clamp(68px, 18vw, 90px);
    background: var(--red);
    color: var(--cream);
    border: 1px solid var(--gold-deep);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.flip .val {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 5.5vw, 28px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    animation: popIn .35s ease;
}

@keyframes popIn {
    from {
        transform: scale(.7);
        opacity: .4;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.unit-label {
    margin-top: 10px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 12px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 600;
}

.unit {
    text-align: center;
}

#confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 999;
}

.bit {
    position: absolute;
    top: -10px;
    width: 8px;
    height: 8px;
    border-radius: 1px;
}

/* ---------- 3. TIMELINE ---------- */
#story {
    background:
        radial-gradient(circle at 50% 0%, rgba(201, 162, 75, .08), transparent 60%);
}

.timeline {
    position: relative;
    padding: 20px 0 6px;
}

/* trục ombre đỏ→vàng, có lớp mờ phía sau tạo chiều sâu */
.t-track {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    margin-left: -.5px;
    background: rgba(122, 92, 62, .18);
}

.t-track::before {
    content: '';
    position: absolute;
    inset: 0 0 0 -3px;
    width: 7px;
    background: repeating-linear-gradient(180deg, transparent 0 10px, rgba(201, 162, 75, .35) 10px 12px);
}

.t-fill {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(180deg, var(--red), var(--gold));
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .1s linear;
    box-shadow: 0 0 8px rgba(224, 165, 38, .5);
}

/* mỗi mốc là 1 hàng full-width, chia 2 cột: ảnh 1 bên + nội dung bên đối diện
   (trước đây ảnh+chữ dồn chung 1 nửa, nửa kia trống — giờ cả 2 nửa đều có nội dung) */
.t-item {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: clamp(24px, 7vw, 56px);
    padding: 0 8px 76px;
}

.t-item:nth-child(even) {
    flex-direction: row-reverse;
}

.t-photo-col,
.t-text-col {
    flex: 1 1 0;
    min-width: 0;
}

.t-photo-col {
    text-align: center;
}

/* huy hiệu mốc: huy chương tròn viền vàng kép, hoa văn ở giữa thay cho chấm tròn — luôn canh giữa trục dọc */
.t-item .dot {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #d84c46, var(--red) 70%);
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px rgba(201, 162, 75, .5), 0 3px 8px rgba(74, 51, 36, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--gold);
    z-index: 2;
}

/* nhãn mốc dạng ruy băng đỏ, đầu vát hình cờ — chỉ hướng về phía trục dọc ở giữa */
.t-item .year {
    display: inline-block;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cream);
    background: var(--red);
    padding: 5px 14px;
    border-radius: 2px;
    position: relative;
    margin-bottom: 12px;
}

.t-item:nth-child(odd) .year::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    border: 14px solid transparent;
    border-left-color: var(--red);
    border-right: 0;
}

.t-item:nth-child(even) .year::after {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    border: 14px solid transparent;
    border-right-color: var(--red);
    border-left: 0;
}

/* khung ảnh kiểu passe-partout với góc trang trí vàng */
.t-item .frame {
    position: relative;
    margin: 0 0 14px;
    padding: 6px;
    background: var(--cream);
    border: 1px solid rgba(201, 162, 75, .5);
    box-shadow: 0 8px 20px rgba(74, 51, 36, .2);
}

.t-item .frame::before,
.t-item .frame::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--gold);
    pointer-events: none;
}

.t-item .frame::before {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
}

.t-item .frame::after {
    bottom: -2px;
    right: -2px;
    border-left: 0;
    border-top: 0;
}

/* ảnh to hơn hẳn — không còn phải chia chỗ với chữ trong cùng 1 cột như trước */
.t-item .photo {
    height: clamp(220px, 42vw, 320px);
    width: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    filter: saturate(1.05) contrast(1.02);
}

/* thẻ nội dung: nền kem đậm nhẹ, viền chỉ vàng mảnh */
.t-item .card {
    background: rgba(247, 236, 211, .6);
    border: 1px solid rgba(201, 162, 75, .3);
    border-radius: 4px;
    padding: 16px 18px;
    text-align: left;
}

.t-item p {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink);
}

/* ---------- 4. GALLERY ---------- */
/* nền màu mận đậm (rượu vang/huyết dụ) — gợi phông nền studio ảnh cưới truyền thống, làm ảnh nổi bật */
#gallery {
    max-width: none;
    background: var(--maroon);
    padding-top: 90px;
    padding-bottom: 100px;
}

#gallery .eyebrow {
    color: var(--gold);
    font-size: 13px;
}

#gallery .section-title {
    color: var(--gold);
    font-size: clamp(28px, 7vw, 38px);
}

#gallery .divider {
    background: var(--gold-deep);
    margin-bottom: 8px;
}

.carousel-wrap {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
}

.carousel {
    display: flex;
    align-items: center;
    gap: 26px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 50px 0 60px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.g-item {
    flex: 0 0 auto;
    width: clamp(230px, 70vw, 340px);
    aspect-ratio: 3/4;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: center;
    border: 2px solid transparent;
    transition: filter .25s ease, transform .25s ease, opacity .25s ease, box-shadow .25s ease, border-color .25s ease;
    filter: blur(3px) brightness(.7);
    transform: scale(.8);
    opacity: .65;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .4);
}

/* ảnh đang ở giữa: viền sáng vàng phát quang nhẹ nhàng thay vì hiệu ứng nhấp nháy */
.g-item.focused {
    border-color: var(--gold);
    animation: glowPulse 2.6s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 20px 45px rgba(0, 0, 0, .55), 0 0 0 3px rgba(224, 165, 38, .25), 0 0 18px 2px rgba(224, 165, 38, .35);
    }

    50% {
        box-shadow: 0 20px 45px rgba(0, 0, 0, .55), 0 0 0 3px rgba(224, 165, 38, .4), 0 0 32px 6px rgba(224, 165, 38, .6);
    }
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- 5. EVENT INFO ---------- */
.event-card {
    background: #f7ecd3;
    border: 1px solid rgba(201, 162, 75, .4);
    border-radius: 10px;
    padding: 26px;
    text-align: center;
    margin-bottom: 20px;
}

.event-card .icon {
    font-size: 26px;
    display: inline-block;
}

.event-card h3 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    margin: .5em 0;
    letter-spacing: .5px;
    color: var(--red);
    font-size: 17px;
}

.event-card p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.event-card .map {
    margin-top: 14px;
    height: 150px;
}

.event-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* ---------- 6. RSVP ---------- */
/* khung bao quanh cả form, đồng bộ hoa văn góc vàng với countdown/timeline */
.rsvp-card {
    position: relative;
    background: rgba(247, 236, 211, .55);
    border: 1px solid rgba(201, 162, 75, .4);
    border-radius: 12px;
    padding: 32px 26px;
    box-shadow: 0 12px 30px rgba(74, 51, 36, .14);
}

.rsvp-card::before,
.rsvp-card::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gold);
    pointer-events: none;
}

.rsvp-card::before {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
}

.rsvp-card::after {
    bottom: -2px;
    right: -2px;
    border-left: 0;
    border-top: 0;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.rsvp-field label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-deep);
    font-weight: 600;
    margin-bottom: 8px;
}

.rsvp-field .input-wrap {
    position: relative;
}

.rsvp-field .input-wrap .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: .7;
    pointer-events: none;
}

.rsvp-form input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    border-radius: 8px;
    border: 1.5px solid rgba(122, 92, 62, .28);
    background: #fffdf8;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.rsvp-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(224, 165, 38, .18);
}

.rsvp-toggle {
    display: flex;
    gap: 10px;
}

.rsvp-toggle button {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    border: 1.5px solid var(--red);
    background: #fffdf8;
    color: var(--red);
    cursor: pointer;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: background .2s ease, color .2s ease, transform .15s ease;
}

.rsvp-toggle button:hover {
    transform: translateY(-1px);
}

.rsvp-toggle button.active {
    background: var(--red);
    color: var(--cream);
    box-shadow: 0 6px 14px rgba(183, 28, 28, .3);
}

.rsvp-form .btn.solid {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.rsvp-thanks {
    text-align: center;
    padding: 40px 26px;
    display: none;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 17px;
    background: rgba(247, 236, 211, .55);
    border: 1px solid rgba(201, 162, 75, .4);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(74, 51, 36, .14);
}

.rsvp-thanks .icon {
    display: block;
    font-size: 30px;
    margin-bottom: 10px;
}

.rsvp-thanks.show {
    display: block;
}

/* ---------- 7. GIFT / QR ---------- */
.flip-card {
    perspective: 1000px;
    height: 220px;
    margin-bottom: 20px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform .7s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 10px;
    background: #f7ecd3;
    border: 1px solid rgba(201, 162, 75, .4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    padding: 16px;
    text-align: center;
}

.flip-face.back {
    transform: rotateY(180deg);
}

.flip-face .name {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 17px;
    color: var(--red);
}

.flip-face .acct {
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 1px;
    font-size: 14px;
}

.qr-ph {
    width: 120px;
    height: 120px;
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translate(-50%, 20px);
    background: var(--red);
    color: var(--cream);
    padding: 10px 18px;
    border-radius: 20px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    opacity: 0;
    transition: opacity .3s, transform .3s;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- 8. THANKS / GUESTBOOK ---------- */
#thanks {
    text-align: center;
    padding-bottom: 100px;
}

#thanks .msg {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(24px, 6vw, 30px);
    color: var(--red);
    line-height: 1.4;
}

#thanks .signature {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 15px;
    margin-top: 6px;
}

.petals {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.petal {
    position: absolute;
    top: -20px;
    font-size: 16px;
    opacity: .8;
}

/* khung thẻ gửi lời chúc — đồng bộ góc vàng trang trí với countdown/RSVP */
.wish-card {
    position: relative;
    background: rgba(247, 236, 211, .55);
    border: 1px solid rgba(201, 162, 75, .4);
    border-radius: 12px;
    padding: 28px 24px;
    margin: 24px auto;
    max-width: 420px;
    box-shadow: 0 12px 30px rgba(74, 51, 36, .14);
    text-align: left;
}

.wish-card::before,
.wish-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold);
    pointer-events: none;
}

.wish-card::before {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
}

.wish-card::after {
    bottom: -2px;
    right: -2px;
    border-left: 0;
    border-top: 0;
}

.wish-card form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.wish-card input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    border-radius: 8px;
    border: 1.5px solid rgba(122, 92, 62, .28);
    background: #fffdf8;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.wish-card input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(224, 165, 38, .18);
}

.wish-card .btn.solid {
    align-self: center;
    width: auto;
    padding: 12px 36px;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.wish-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

/* mỗi lời chúc như 1 tấm thiệp nhỏ, dấu ngoặc kép trang trí phía sau */
.wish-item {
    position: relative;
    background: #fffdf8;
    border-radius: 10px;
    padding: 18px 20px 16px 22px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink);
    animation: flyIn .5s ease;
    border: 1px solid rgba(201, 162, 75, .3);
    border-left: 3px solid var(--gold);
    box-shadow: 0 6px 16px rgba(74, 51, 36, .1);
    overflow: hidden;
}

.wish-item::before {
    content: '“';
    position: absolute;
    top: -14px;
    right: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    color: rgba(183, 28, 28, .1);
    line-height: 1;
    pointer-events: none;
}

@keyframes flyIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wish-item .wish-name {
    display: block;
    color: var(--red);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 15.5px;
    margin-bottom: 4px;
}

.wish-item .wish-msg {
    display: block;
    position: relative;
}
