/* ================= Reset ================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* --primary-color / --primary-rgb / --primary-hover: từ css/brand.css */
    --save-date-animation-duration: .55s;
    --section-animation-duration: .85s;
    --gallery-animation-duration: .82s;
    --animation-easing: cubic-bezier(.22, 1, .36, 1);
}

html {
    font-size: 50px;
    overflow-x: hidden;
}

@media (max-width:480px) {
    html {
        font-size: calc(100vw / 10);
    }
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
        Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB",
        "Microsoft Yahei", sans-serif;
    font-size: .28rem;
    color: #000;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

body.concept-loading .container {
    opacity: 0;
    visibility: hidden;
}

body:not(.concept-loading) .container {
    opacity: 1;
    visibility: visible;
    transition: opacity .28s ease;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

button {
    width: 100%;
    border: none;
    border-radius: .2rem;
    color: #fff;
    font-size: .35rem;
    cursor: pointer;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--site-background-image, url("../../img/bg.jpeg")) center center / cover no-repeat;
    filter: blur(12px);
    transform: scale(1.08);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.25); /* tùy chỉnh độ sáng */
    z-index: -1;
}

/* ================= Layout ================= */

.container {
    max-width: 480px;
    margin: 0 auto;
    overflow-x: hidden;
    background: #fff;
}

/* ================= Floating Actions ================= */

.floating-gift {
    position: fixed;
    right: .4rem;
    bottom: 1.92rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), .2);
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), .22);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(28px, 22px) scale(.75);
    transition:
        opacity .55s ease .08s,
        visibility .55s ease .08s,
        transform .7s cubic-bezier(.22, 1, .36, 1) .08s,
        box-shadow .25s ease,
        background .25s ease,
        color .25s ease;
    z-index: 9999;
}

.floating-gift.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
}

.floating-gift i {
    font-size: .48rem;
    line-height: 1;
}

.floating-gift:hover {
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), .38);
}

/* ================= Music ================= */

.music-player {
    position: fixed;
    right: .4rem;
    bottom: .6rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), .34);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(28px, 22px) scale(.75);
    transition:
        opacity .55s ease,
        visibility .55s ease,
        transform .7s cubic-bezier(.22, 1, .36, 1),
        box-shadow .25s ease,
        background .25s ease;
    z-index: 9999;
}

.music-player.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
}

.music-player:hover {
    background: var(--primary-hover);
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), .44);
}

.music-equalizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: .08rem;
    width: .58rem;
    height: .5rem;
}

.music-equalizer span {
    display: block;
    width: .09rem;
    height: .18rem;
    border-radius: 999px;
    background: #fff;
    opacity: .9;
    transform-origin: bottom center;
}

.music-equalizer span:nth-child(1) {
    height: .22rem;
}

.music-equalizer span:nth-child(2) {
    height: .34rem;
}

.music-equalizer span:nth-child(3) {
    height: .46rem;
}

.music-equalizer span:nth-child(4) {
    height: .3rem;
}

.music-player.playing .music-equalizer span {
    animation: musicBeat .78s ease-in-out infinite;
}

.music-player.playing .music-equalizer span:nth-child(2) {
    animation-delay: .12s;
}

.music-player.playing .music-equalizer span:nth-child(3) {
    animation-delay: .24s;
}

.music-player.playing .music-equalizer span:nth-child(4) {
    animation-delay: .36s;
}

@keyframes musicBeat {
    0%, 100% {
        transform: scaleY(.45);
    }

    45% {
        transform: scaleY(1);
    }
}




/* ================= Wedding Error ================= */
.wedding-error {
    min-height: 100vh;
    width: min(100%, 480px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: .6rem;
    background: linear-gradient(180deg, #fff, rgba(var(--primary-rgb), .12));
    text-align: center;
}

.wedding-error__card {
    width: 100%;
    padding: .7rem .45rem;
    border-radius: .32rem;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(var(--primary-rgb), .14);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .08);
}

.wedding-error__card i {
    display: inline-grid;
    place-items: center;
    width: 1rem;
    height: 1rem;
    margin-bottom: .28rem;
    border-radius: 50%;
    color: #fff;
    background: var(--primary-color);
    font-size: .42rem;
}

.wedding-error__card h1 {
    margin-bottom: .18rem;
    color: #333;
    font-size: .42rem;
    line-height: 1.35;
}

.wedding-error__card p {
    color: #666;
    font-size: .28rem;
    line-height: 1.7;
}

/* ================= Landing (trang chủ quảng cáo) ================= */
/* Override html font-size 50px của thiệp — landing dùng px lớn, dễ đọc */
html.landing-html,
html:has(body.landing-page) {
    font-size: 18px !important;
}

body.landing-page {
    min-height: 100vh;
    color: #3d2f24;
    font-family: Quicksand, "Nunito Sans", system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.5;
    background:
        radial-gradient(circle at 12% 10%, rgba(var(--brand-primary-rgb), .28), transparent 32%),
        radial-gradient(circle at 88% 0%, rgba(var(--brand-primary-rgb), .22), transparent 28%),
        linear-gradient(160deg, #f0f8ee 0%, #e4f2e0 45%, #f7fcf6 100%);
}

body.landing-page::before {
    display: none;
}

.landing {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 40px;
    align-items: center;
    position: relative;
}

.landing__glow {
    position: absolute;
    inset: auto auto 10% 8%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(var(--brand-primary-rgb), .18);
    filter: blur(40px);
    pointer-events: none;
}

.landing__eyebrow {
    margin: 0 0 12px;
    color: var(--brand-primary);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.landing__hero h1 {
    margin: 0 0 18px;
    font-family: Lora, Georgia, serif;
    font-size: clamp(32px, 5.2vw, 52px);
    line-height: 1.18;
    color: #342a22;
}

.landing__lead {
    margin: 0 0 28px;
    max-width: 560px;
    color: #6a5848;
    font-size: 18px;
    line-height: 1.7;
}

.landing__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.landing__cta,
.landing__ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.landing__cta {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 14px 32px rgba(var(--brand-primary-rgb), .28);
}

.landing__ghost {
    background: rgba(255, 255, 255, .88);
    color: var(--brand-primary-hover);
    border: 1px solid rgba(var(--brand-primary-rgb), .28);
}

.landing__cta:hover,
.landing__ghost:hover {
    transform: translateY(-1px);
}

.landing__features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin: 0;
    padding: 0;
}

.landing__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #4b3a2c;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.landing__features i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--brand-primary);
    font-size: 20px;
}

.landing__card {
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(var(--brand-primary-rgb), .16);
    box-shadow: 0 24px 60px rgba(98, 69, 38, .12);
}

.landing__phone {
    border-radius: 28px;
    overflow: hidden;
    background: #2f2a26;
    padding: 10px;
    aspect-ratio: 9 / 16;
    max-height: 520px;
}

.landing__phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.landing__note {
    margin: 16px 0 0;
    color: #6a5848;
    font-size: 15px;
    line-height: 1.55;
}

.landing__note code {
    font-size: 14px;
    color: var(--brand-primary-hover);
}

@media (max-width: 820px) {
    .landing {
        grid-template-columns: 1fr;
        padding: 32px 0 48px;
        gap: 28px;
    }

    .landing__hero h1 {
        font-size: clamp(28px, 8vw, 36px);
    }

    .landing__lead {
        font-size: 17px;
    }

    .landing__features {
        grid-template-columns: 1fr;
    }

    .landing__features li {
        font-size: 16px;
    }

    .landing__phone {
        max-height: 420px;
        margin: 0 auto;
        width: min(320px, 100%);
    }

    .landing__actions {
        flex-direction: column;
    }

    .landing__cta,
    .landing__ghost {
        width: 100%;
        min-height: 54px;
        font-size: 17px;
    }
}
