@font-face {
    font-family: 'Great Vibes';
    font-weight: 400;
    font-display: swap;
    src: url('fonts/great-vibes-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Great Vibes';
    font-weight: 400;
    font-display: swap;
    src: url('fonts/great-vibes-latin-ext-400-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Playfair Display';
    font-weight: 800;
    font-display: swap;
    src: url('fonts/playfair-display-latin-800-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Playfair Display';
    font-weight: 800;
    font-display: swap;
    src: url('fonts/playfair-display-latin-ext-800-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Nunito';
    font-weight: 500;
    font-display: swap;
    src: url('fonts/nunito-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Nunito';
    font-weight: 500;
    font-display: swap;
    src: url('fonts/nunito-latin-ext-500-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Nunito';
    font-weight: 800;
    font-display: swap;
    src: url('fonts/nunito-latin-800-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Nunito';
    font-weight: 800;
    font-display: swap;
    src: url('fonts/nunito-latin-ext-800-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

[hidden] {
    display: none !important;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    font-family: 'Nunito', sans-serif;
    color: #fff;
    background: radial-gradient(circle at 50% 70%, #7a1426 0%, #2a0f33 42%, #0b1533 100%) fixed;
}

body.popup-open {
    overflow: hidden;
}

.snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.light-string {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 26px;
    display: flex;
    justify-content: space-between;
    border-top: 2px solid #1f4a35;
}

.light-bulb {
    width: 10px;
    height: 16px;
    margin-top: 3px;
    border-radius: 50%;
    animation: twinkle 1600ms ease-in-out infinite;
}

.light-bulb:nth-child(4n+1) {
    color: #ffcf5c;
    background: #ffcf5c;
}

.light-bulb:nth-child(4n+2) {
    color: #ff5470;
    background: #ff5470;
    animation-delay: 400ms;
}

.light-bulb:nth-child(4n+3) {
    color: #6fe3a5;
    background: #6fe3a5;
    animation-delay: 800ms;
}

.light-bulb:nth-child(4n) {
    color: #6fc3ff;
    background: #6fc3ff;
    animation-delay: 1200ms;
}

.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 48px 20px 32px;
    text-align: center;
}

.hero-eyebrow {
    padding: 8px 18px;
    border: 1px solid rgba(255, 211, 107, 0.55);
    border-radius: 40px;
    font-size: 16px;
    font-weight: 800;
    color: #ffe7b0;
    background: rgba(255, 255, 255, 0.08);
    animation: rise 900ms ease both;
}

.hero-title {
    max-width: 900px;
    animation: rise 900ms 150ms ease both;
}

.hero-lead {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 4.4vw, 46px);
    line-height: 1.2;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.6);
}

.hero-name {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: clamp(60px, 11vw, 112px);
    line-height: 1.2;
    white-space: nowrap;
    background: linear-gradient(100deg, #ffc43d 20%, #fffbe8 40%, #ffc43d 60%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 16px;
    filter: drop-shadow(0 0 16px rgba(255, 190, 60, 0.55));
    animation: shine 3500ms linear infinite;
}

.gift {
    pointer-events: none;
    position: relative;
    width: 180px;
    height: 170px;
    margin-top: 26px;
    animation: wiggle 2800ms ease-in-out infinite;
}

.gift-glow {
    position: absolute;
    inset: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 208, 100, 0.55), transparent 65%);
    animation: pulse 2200ms ease-in-out infinite;
}

.gift-box,
.gift-lid {
    position: absolute;
    background: linear-gradient(90deg, transparent 42%, #ffd36b 42%, #ffedb5 50%, #ffd36b 58%, transparent 58%), linear-gradient(160deg, #ef3b4f, #a80f2a);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.gift-box {
    left: 12px;
    bottom: 0;
    width: 156px;
    height: 118px;
    border-radius: 4px 4px 14px 14px;
}

.gift-lid {
    left: 0;
    top: 22px;
    width: 180px;
    height: 36px;
    z-index: 1;
    border-radius: 8px;
    transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 700ms;
}

.gift-bow::before,
.gift-bow::after {
    content: '';
    position: absolute;
    bottom: 100%;
    width: 48px;
    height: 34px;
    border: 9px solid #ffd36b;
    border-radius: 50% 50% 10% 50%;
}

.gift-bow::before {
    right: 50%;
    transform: rotate(18deg);
}

.gift-bow::after {
    left: 50%;
    border-radius: 50% 50% 50% 10%;
    transform: rotate(-18deg);
}

.gift.is-opening {
    animation: none;
}

.gift.is-opening .gift-lid {
    transform: translate(40px, -120px) rotate(28deg);
    opacity: 0;
}

.gift.is-opening .gift-glow {
    animation: burst 800ms ease forwards;
}

.open-button {
    margin-top: 12px;
    padding: 20px 46px;
    border: 0;
    border-radius: 60px;
    font-family: 'Nunito', sans-serif;
    font-size: 23px;
    font-weight: 800;
    color: #6d0b1d;
    background: linear-gradient(135deg, #fff1bd, #ffc84a);
    cursor: pointer;
    animation: beacon 1800ms ease-out infinite;
    transition: transform 200ms;
}

.open-button:hover {
    transform: scale(1.06);
}

.open-button:focus-visible,
.popup-close:focus-visible,
.sound-toggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.hero-hint {
    font-size: 16px;
    font-weight: 800;
    color: #ffe7b0;
}

.popup {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(6, 8, 24, 0.9);
    animation: fade 400ms ease both;
}

.popup-card {
    position: relative;
    animation: pop 800ms cubic-bezier(0.18, 1.3, 0.4, 1) both;
}

.popup-image {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
    box-shadow: 0 0 60px rgba(255, 200, 74, 0.45);
}

.fireworks-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.popup-close,
.sound-toggle {
    position: absolute;
    top: 14px;
    width: 44px;
    height: 44px;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.popup-close {
    right: 14px;
    font-size: 30px;
}

.sound-toggle {
    left: 14px;
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 14px 3px currentColor;
    }

    50% {
        opacity: 0.35;
        box-shadow: none;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

@keyframes shine {
    to {
        background-position: -200% center;
    }
}

@keyframes wiggle {
    0%,
    60%,
    100% {
        transform: rotate(0);
    }

    66% {
        transform: rotate(-6deg);
    }

    72% {
        transform: rotate(5deg);
    }

    78% {
        transform: rotate(-4deg);
    }

    84% {
        transform: rotate(2deg);
    }
}

@keyframes pulse {
    50% {
        transform: scale(1.18);
        opacity: 0.65;
    }
}

@keyframes burst {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

@keyframes beacon {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 205, 90, 0.7);
    }

    100% {
        box-shadow: 0 0 0 24px rgba(255, 205, 90, 0);
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(0.2) rotate(-8deg);
    }
}

@media (max-height: 760px) {
    .hero {
        gap: 12px;
        padding: 40px 16px 20px;
    }

    .hero-name {
        font-size: clamp(54px, min(11vw, 12vh), 90px);
    }

    .gift {
        margin: -4px 0 -18px;
        transform-origin: center;
        scale: 0.72;
    }

    .open-button {
        padding: 16px 34px;
        font-size: 20px;
    }
}

html {
    overflow-x: hidden;
}

@media (max-width: 340px) {
    .hero-eyebrow {
        padding: 7px 12px;
        font-size: 14px;
    }
}
