/* =========================================================
   GRADUATION INVITATION
   VŨ NGỌC TÂN · 2026

   Mobile First
   ========================================================= */


/* =========================================================
   01. VARIABLES
========================================================= */

:root {
    --cream: #f8fafc;
    --cream-light: #fdfdfd;
    --ivory: #ffffff;
    --beige: #e2e8f0;
    --beige-light: #f1f5f9;
    --beige-dark: #94a3b8;

    --ink: #0f172a;
    --ink-soft: #475569;

    --green: #1e3a8a;
    --green-dark: #172554;
    --green-deep: #08112b;

    --gold: #d4af37;
    --gold-light: #f3e5ab;

    --burgundy: #991b1b;
    --burgundy-dark: #7f1d1d;

    --white: #ffffff;

    --font-serif: "Cormorant Garamond", Georgia, serif;
    --font-display: "Playfair Display", Georgia, serif;
    --font-script: "Great Vibes", cursive;
    --font-sans: "Be Vietnam Pro", Arial, sans-serif;

    --container: 1180px;

    --section-padding:
        clamp(63px, 12.5vw, 105px);

    --ease-out:
        cubic-bezier(0.16, 1, 0.3, 1);

    --ease-cinematic:
        cubic-bezier(0.65, 0, 0.35, 1);

    --shadow-soft:
        0 25px 70px rgba(15, 23, 42, 0.11);

    --shadow-card:
        0 22px 60px rgba(15, 23, 42, 0.07);
}


/* =========================================================
   02. RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;

    min-width: 320px;

    overflow-x: hidden;

    color: var(--ink);
    background: var(--cream-light);

    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.7;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.is-locked {
    overflow: hidden;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

address {
    font-style: normal;
}

::selection {
    color: var(--cream-light);
    background: var(--green);
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

.falling-stars-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}


/* =========================================================
   03. COMMON
========================================================= */

.container {
    width: min(calc(100% - 40px),
            var(--container));

    margin-inline: auto;
}

.section {
    position: relative;
}

.section-label {
    margin: 0 0 22px;

    color: var(--green);

    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.24em;
    line-height: 1.4;
}

.section-label--light {
    color: rgba(255, 255, 255, 0.56);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 54px;
}

.section-heading--center {
    margin-inline: auto;
    text-align: center;
}

.section-heading h2 {
    margin: 0;

    color: var(--ink);

    font-family: var(--font-serif);
    font-size: clamp(42px, 12vw, 78px);
    font-weight: 500;

    letter-spacing: -0.035em;
    line-height: 0.98;
}

.section-heading h2 em {
    display: block;

    color: var(--green);

    font-weight: 400;
}

.button {
    min-height: 56px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 28px;

    padding: 0 24px;

    border-radius: 0;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.17em;

    transition:
        background 300ms ease,
        color 300ms ease,
        border-color 300ms ease,
        transform 300ms var(--ease-out);
}

.button i {
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-style: normal;

    transition: transform 300ms var(--ease-out);
}

.button:active {
    transform: scale(0.98);
}

.button--outline {
    color: var(--green);

    border: 1px solid rgba(30, 58, 138, 0.35);
}

.button--dark {
    color: var(--cream-light);
    background: var(--green);

    border: 1px solid var(--green);
}


/* =========================================================
   04. OPENING SCREEN
========================================================= */

.intro-screen {
    position: fixed;
    z-index: 9999;
    inset: 0;

    width: 100%;

    min-height: 100vh;
    min-height: 100svh;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        max(26px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));

    background:
        radial-gradient(circle at 50% 30%,
            rgba(255, 255, 255, 0.9) 0,
            rgba(255, 255, 255, 0.25) 30%,
            transparent 62%),
        linear-gradient(145deg,
            #f8fafc 0%,
            #f1f5f9 52%,
            #e2e8f0 100%);
}

.intro-screen__glow {
    position: absolute;
    top: -15%;
    left: 50%;

    width: 85vw;
    height: 60vh;

    transform: translateX(-50%);

    background:
        radial-gradient(ellipse,
            rgba(255, 255, 255, 0.85),
            transparent 70%);

    pointer-events: none;
}

.intro-screen__grain {
    position: absolute;
    inset: 0;

    opacity: 0.18;

    pointer-events: none;

    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.08'/%3E%3C/svg%3E");
}

.intro-container {
    position: relative;
    z-index: 2;

    width: min(100%, 500px);

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.intro-copy {
    margin-bottom: clamp(40px, 7vh, 66px);
}

.intro-copy__eyebrow {
    margin: 0 0 16px;

    color: rgba(15, 23, 42, 0.58);

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.28em;
}

.intro-copy__title {
    margin: 0;

    color: var(--ink);

    font-family: var(--font-serif);
    font-size: clamp(38px, 10vw, 58px);
    font-weight: 500;

    letter-spacing: -0.035em;
    line-height: 0.96;
}

.intro-copy__title span {
    display: block;
}

.intro-copy__title em {
    position: relative;

    display: inline-block;

    margin-right: 6px;

    color: var(--burgundy);

    font-family: var(--font-script);
    font-size: 1.05em;
    font-weight: 400;

    transform: rotate(-3deg);
}

.intro-copy__ornament {
    width: 106px;

    display: flex;
    align-items: center;
    gap: 10px;

    margin: 26px auto 0;
}

.intro-copy__ornament span {
    height: 1px;
    flex: 1;

    background:
        rgba(15, 23, 42, 0.25);
}

.intro-copy__ornament i {
    width: 4px;
    height: 4px;

    display: block;

    transform: rotate(45deg);

    background: var(--gold);
}


/* =========================================================
   05. ENVELOPE
========================================================= */

.envelope-stage {
    position: relative;

    width: min(88vw, 390px);

    perspective: 1200px;
}

.envelope-trigger {
    width: 100%;

    display: block;

    margin: 0;
    padding: 0;

    cursor: pointer;

    border: 0;
    outline: 0;
    background: transparent;
}

.envelope-trigger:focus-visible .envelope__shell {
    outline: 2px solid var(--gold);
    outline-offset: 8px;
}

.envelope {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 1.48 / 1;
}

.envelope__shadow {
    position: absolute;
    z-index: 0;

    left: 8%;
    right: 8%;
    bottom: -11px;

    height: 32px;

    border-radius: 50%;

    opacity: 0.5;

    filter: blur(16px);

    background:
        rgba(15, 23, 42, 0.28);

    transition:
        opacity 800ms ease,
        transform 800ms ease;
}

.envelope__shell {
    position: absolute;
    z-index: 2;

    inset: 0;

    display: block;

    transform-style: preserve-3d;
}

.envelope__back {
    position: absolute;
    z-index: 1;

    inset: 0;

    display: block;

    overflow: hidden;

    transform: translateZ(0px);

    border:
        1px solid rgba(148, 163, 184, 0.16);

    background:
        linear-gradient(145deg,
            #e2e8f0,
            #f1f5f9);

    box-shadow:
        0 25px 65px rgba(15, 23, 42, 0.16);
}


/* ---------------------------------------------------------
   LETTER
--------------------------------------------------------- */

.envelope__letter {
    position: absolute;
    z-index: 2;

    left: 7%;
    right: 7%;
    bottom: 8%;

    height: 86%;

    display: block;

    transform:
        translateY(4%) translateZ(1px);

    will-change: transform;

    background: var(--ivory);

    box-shadow:
        0 10px 32px rgba(15, 23, 42, 0.13);
}

.letter-card {
    position: absolute;
    inset: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border:
        1px solid rgba(212, 175, 55, 0.43);
}

.letter-card::before,
.letter-card::after {
    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    border-color:
        rgba(212, 175, 55, 0.55);
}

.letter-card::before {
    top: 5px;
    left: 5px;

    border-top: 1px solid;
    border-left: 1px solid;
}

.letter-card::after {
    right: 5px;
    bottom: 5px;

    border-right: 1px solid;
    border-bottom: 1px solid;
}

.letter-card__small {
    color: var(--beige-dark);

    font-family: var(--font-sans);
    font-size: 8px;
    font-weight: 600;

    letter-spacing: 0.3em;
}

.letter-card__monogram {
    margin: 5px 0 -2px;

    color: var(--green);

    font-family: var(--font-serif);
    font-size: clamp(32px, 10vw, 52px);
    font-weight: 500;

    letter-spacing: -0.08em;
    line-height: 1;
}

.letter-card__icon {
    margin: 5px 0 8px;

    color: var(--green);

    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-card__icon svg {
    width: clamp(22px, 6vw, 32px);
    height: clamp(22px, 6vw, 32px);
}

.letter-card__name {
    color: var(--burgundy);

    font-family: var(--font-script);
    font-size: clamp(22px, 7vw, 34px);

    line-height: 1;
}

.letter-card__year {
    margin-top: 8px;

    color: var(--ink-soft);

    font-family: var(--font-serif);
    font-size: 9px;

    letter-spacing: 0.34em;
}


/* ---------------------------------------------------------
   FRONT ENVELOPE PANELS
--------------------------------------------------------- */

.envelope__front {
    position: absolute;
    z-index: 4;

    inset: 0;

    display: block;

    pointer-events: none;

    transform: translateZ(2px);
}

.envelope__front--left {
    clip-path:
        polygon(0 0,
            52% 54%,
            0 100%);

    background:
        linear-gradient(125deg,
            #f1f5f9,
            #cbd5e1);
}

.envelope__front--right {
    clip-path:
        polygon(100% 0,
            48% 54%,
            100% 100%);

    background:
        linear-gradient(235deg,
            #f1f5f9,
            #cbd5e1);
}

.envelope__front--bottom {
    z-index: 5;

    transform: translateZ(2.5px);

    clip-path:
        polygon(0 100%,
            50% 48%,
            100% 100%);

    background:
        linear-gradient(180deg,
            #e2e8f0,
            #cbd5e1);
}


/* ---------------------------------------------------------
   FLAP
--------------------------------------------------------- */

.envelope__flap {
    position: absolute;
    z-index: 6;

    top: 0;
    left: 0;

    width: 100%;
    height: 59%;

    display: block;

    transform-origin:
        50% 0;

    transform:
        rotateX(0deg) translateZ(3px);

    transform-style: preserve-3d;

    will-change: transform;

    clip-path:
        polygon(0 0,
            100% 0,
            50% 100%);

    background:
        linear-gradient(165deg,
            #f1f5f9 0%,
            #e2e8f0 100%);

    filter:
        drop-shadow(0 4px 2px rgba(15, 23, 42, 0.05));
}


/* ---------------------------------------------------------
   WAX SEAL
--------------------------------------------------------- */

.wax-seal {
    position: absolute;
    z-index: 8;

    top: 50%;
    left: 50%;

    width: clamp(58px, 17vw, 72px);
    height: clamp(58px, 17vw, 72px);

    display: flex;
    align-items: center;
    justify-content: center;

    transform:
        translate(-50%, -50%) rotate(-5deg) translateZ(4px);

    border-radius:
        48% 52% 45% 55% / 55% 45% 53% 47%;

    color: #f1f5f9;

    background:
        radial-gradient(circle at 35% 30%,
            #b91c1c,
            var(--burgundy) 46%,
            var(--burgundy-dark) 100%);

    box-shadow:
        inset 2px 3px 7px rgba(255, 255, 255, 0.13),
        inset -4px -5px 8px rgba(15, 23, 42, 0.25),
        0 5px 12px rgba(15, 23, 42, 0.25);

    will-change:
        transform,
        opacity;
}

.wax-seal::before,
.wax-seal::after {
    content: "";

    position: absolute;

    background: var(--burgundy);
}

.wax-seal::before {
    width: 12px;
    height: 15px;

    top: -4px;
    right: 5px;

    border-radius: 45% 55% 60% 40%;
}

.wax-seal::after {
    width: 13px;
    height: 11px;

    bottom: 1px;
    left: -3px;

    border-radius: 55% 45% 42% 58%;
}

.wax-seal__ring {
    position: absolute;

    inset: 8px;

    border:
        1px solid rgba(226, 232, 240, 0.42);

    border-radius: inherit;
}

.wax-seal__initials {
    position: relative;
    z-index: 2;

    font-family: var(--font-serif);
    font-size: clamp(23px, 7vw, 31px);
    font-weight: 600;

    letter-spacing: -0.08em;
    line-height: 1;
}

.wax-seal__icon {
    position: relative;
    z-index: 2;

    color: #f1f5f9;

    display: flex;
    align-items: center;
    justify-content: center;
}

.wax-seal__icon svg {
    width: clamp(20px, 5vw, 26px);
    height: clamp(20px, 5vw, 26px);

    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}


/* ---------------------------------------------------------
   OPEN HINT
--------------------------------------------------------- */

.open-hint {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-top: 28px;
}

.open-hint__text {
    color:
        rgba(15, 23, 42, 0.64);

    font-size: 11px;
    font-weight: 500;

    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.open-hint__line {
    position: relative;

    width: 1px;
    height: 32px;

    display: block;

    margin-top: 12px;

    overflow: hidden;

    background:
        rgba(15, 23, 42, 0.15);
}

.open-hint__line::after {
    content: "";

    position: absolute;
    top: -100%;
    left: 0;

    width: 100%;
    height: 100%;

    background: var(--burgundy);

    animation:
        hintLine 2s ease-in-out infinite;
}

.intro-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin:
        clamp(22px, 4vh, 42px) 0 0;

    color:
        rgba(15, 23, 42, 0.39);

    font-family: var(--font-serif);
    font-size: 11px;

    letter-spacing: 0.18em;
}

.intro-footer span {
    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: var(--gold);
}


/* =========================================================
   06. ENVELOPE OPEN ANIMATION
========================================================= */

/*
   Sequence:

   0.00s Seal reacts
   0.18s Seal fades
   0.28s Flap starts opening
   0.90s Letter begins rising
   1.80s Envelope leaves
   2.35s Main invitation appears
*/

.envelope-stage.is-opening .wax-seal {
    animation:
        sealRelease 560ms var(--ease-out) forwards;
}

.envelope-stage.is-opening .envelope__flap {
    animation:
        flapOpen 850ms 260ms var(--ease-cinematic) forwards;
}

.envelope-stage.is-opening .envelope__letter {
    animation:
        letterRise 1100ms 850ms var(--ease-out) forwards;
}

.envelope-stage.is-opening .envelope__shadow {
    animation:
        shadowChange 1200ms 650ms ease forwards;
}

.envelope-stage.is-opening .open-hint {
    animation:
        fadeAway 350ms ease forwards;
}

.intro-screen.is-leaving .intro-copy {
    animation:
        introCopyLeave 650ms var(--ease-out) forwards;
}

.intro-screen.is-leaving .intro-footer {
    animation:
        fadeAway 450ms ease forwards;
}

.intro-screen.is-leaving .envelope-stage {
    animation:
        envelopeLeave 700ms var(--ease-cinematic) forwards;
}

.intro-screen.is-leaving {
    animation:
        introScreenLeave 760ms 160ms var(--ease-cinematic) forwards;
}


/* =========================================================
   07. MAIN INVITATION
========================================================= */

.invitation {
    position: relative;

    visibility: hidden;

    opacity: 0;

    background: var(--cream-light);
}

.invitation.is-visible {
    visibility: visible;

    opacity: 1;

    animation:
        invitationEnter 1000ms var(--ease-out) both;
}


/* =========================================================
   08. HERO
========================================================= */

.hero {
    position: relative;

    min-height: 100vh;
    min-height: 100svh;

    overflow: hidden;

    padding:
        max(56px, calc(env(safe-area-inset-top) + 38px)) 0 63px;

    background:
        radial-gradient(circle at 80% 25%,
            rgba(203, 213, 225, 0.25),
            transparent 34%),
        linear-gradient(150deg,
            #ffffff 0%,
            #f1f5f9 100%);
}

.hero__decor {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.hero__decor--one {
    width: 190px;
    height: 190px;

    top: -85px;
    right: -100px;

    border:
        1px solid rgba(212, 175, 55, 0.25);
}

.hero__decor--two {
    width: 72px;
    height: 72px;

    top: 57%;
    left: -50px;

    border:
        1px solid rgba(30, 58, 138, 0.13);
}

.hero__container {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    gap: 42px;
}

.hero__content {
    text-align: center;
}

.hero__eyebrow {
    margin: 0 0 30px;

    color: var(--green);

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.23em;
}

.hero__eyebrow span {
    display: inline-block;

    margin-inline: 7px;

    color: var(--gold);
}

.hero__script {
    position: relative;
    z-index: 2;

    margin: 0 0 2px;

    color: var(--burgundy);

    font-family: var(--font-script);
    font-size: clamp(34px, 10vw, 58px);

    line-height: 1.1;
}

.hero__name {
    margin: 4px 0 10px;

    color: var(--burgundy);

    font-family: var(--font-serif);
    font-size: clamp(42px, 13vw, 84px);
    font-weight: 500;

    letter-spacing: -0.035em;
    line-height: 1;
    word-break: break-word;
}

.hero__graduate-label {
    margin: 22px 0 4px;

    color: var(--ink-soft);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero__graduate-name {
    margin: 0 0 20px;

    color: var(--green);

    font-family: var(--font-serif);
    font-size: clamp(28px, 7.5vw, 48px);
    font-weight: 600;

    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero__divider {
    width: min(230px, 62%);

    display: flex;
    align-items: center;
    gap: 13px;

    margin: 32px auto;
}

.hero__divider span {
    height: 1px;
    flex: 1;

    background:
        rgba(15, 23, 42, 0.2);
}

.hero__divider i {
    color: var(--gold);

    font-size: 9px;
    font-style: normal;
}

.hero__description {
    max-width: 370px;

    margin:
        0 auto;

    color: var(--ink-soft);

    font-family: var(--font-serif);
    font-size: clamp(18px, 5.2vw, 23px);

    line-height: 1.55;
}

.hero__date-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    margin-top: 28px;

    color:
        rgba(15, 23, 42, 0.54);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.19em;
}

.hero__date-mini i {
    width: 3px;
    height: 3px;

    display: block;

    transform: rotate(45deg);

    background: var(--gold);
}


/* ---------------------------------------------------------
   HERO PORTRAIT
--------------------------------------------------------- */

.hero__portrait-wrap {
    position: relative;

    width: min(92%, 430px);

    margin-inline: auto;
}

.portrait {
    position: relative;
}

.portrait__frame {
    position: relative;

    padding: 7px;

    border:
        1px solid rgba(30, 58, 138, 0.22);

    border-radius:
        46% 46% 4px 4px / 25% 25% 4px 4px;
}

.portrait__media {
    position: relative;

    width: 100%;

    aspect-ratio: 0.76;

    overflow: hidden;

    border-radius:
        46% 46% 2px 2px / 25% 25% 2px 2px;

    background:
        linear-gradient(145deg,
            #cbd5e1,
            #e2e8f0);
}

.portrait__media img {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;
}

.portrait__placeholder {
    position: absolute;
    z-index: 1;

    top: 50%;
    left: 50%;

    transform:
        translate(-50%, -50%);

    color:
        rgba(15, 23, 42, 0.23);

    font-family: var(--font-serif);
    font-size: 30px;

    letter-spacing: 0.14em;
    line-height: 1.2;
    text-align: center;
}

.portrait__caption {
    margin-top: 8px;

    color:
        rgba(15, 23, 42, 0.38);

    font-family: var(--font-serif);
    font-size: 10px;
    font-style: italic;

    text-align: center;
}

.class-badge {
    position: absolute;
    z-index: 3;

    right: -4px;
    bottom: 11%;

    width: 78px;
    height: 78px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transform: rotate(5deg);

    border: 1px solid rgba(255, 255, 255, 0.38);

    border-radius: 50%;

    color: #f8fafc;
    background: var(--green);

    box-shadow:
        0 14px 35px rgba(30, 58, 138, 0.22);
}

.class-badge span {
    font-family: var(--font-script);
    font-size: 20px;

    line-height: 0.9;
}

.class-badge strong {
    margin-top: 3px;

    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 500;

    letter-spacing: 0.03em;
}

.portrait-star {
    position: absolute;

    top: 18%;
    left: -20px;

    color: var(--gold);

    font-size: 16px;

    animation:
        starRotate 8s linear infinite;
}

.scroll-note {
    position: absolute;
    z-index: 2;

    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    color: rgba(15, 23, 42, 0.38);

    font-size: 8px;
    font-weight: 600;

    letter-spacing: 0.2em;
    white-space: nowrap;
    pointer-events: none;
}

.scroll-note i {
    width: 36px;
    height: 1px;

    background: rgba(15, 23, 42, 0.25);
}


/* Hero entrance animations */

.invitation.is-visible .hero__eyebrow {
    animation:
        heroFadeUp 900ms 150ms var(--ease-out) both;
}

.invitation.is-visible .hero__script {
    animation:
        heroFadeUp 1000ms 300ms var(--ease-out) both;
}

.invitation.is-visible .hero__name {
    animation:
        heroFadeUp 1050ms 390ms var(--ease-out) both;
}

.invitation.is-visible .hero__divider,
.invitation.is-visible .hero__description,
.invitation.is-visible .hero__date-mini {
    animation:
        heroFadeUp 1050ms 520ms var(--ease-out) both;
}

.invitation.is-visible .hero__portrait-wrap {
    animation:
        heroPortraitEnter 1200ms 640ms var(--ease-out) both;
}


/* =========================================================
   09. LITTLE NOTE
========================================================= */

.note-section {
    padding:
        var(--section-padding) 0;

    background: var(--cream);
}

.note-card {
    position: relative;

    max-width: 800px;

    margin-left: auto;

    padding:
        58px 28px 38px;

    border:
        1px solid rgba(15, 23, 42, 0.12);

    background:
        rgba(255, 255, 255, 0.72);

    box-shadow: var(--shadow-card);
}

.note-card::before {
    content: "";

    position: absolute;

    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;

    pointer-events: none;

    border:
        1px solid rgba(212, 175, 55, 0.17);
}

.note-card__quote {
    position: absolute;

    top: 4px;
    left: 20px;

    color:
        rgba(30, 58, 138, 0.13);

    font-family: var(--font-serif);
    font-size: 110px;

    line-height: 1;
}

.note-card__body {
    position: relative;
    z-index: 2;
}

.note-card__body p {
    margin:
        0 0 28px;

    color: var(--ink-soft);

    font-family: var(--font-serif);
    font-size: clamp(20px, 5.5vw, 27px);

    line-height: 1.55;
}

.note-card__body p:last-child {
    margin-bottom: 0;
}

.note-card__footer {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;

    margin-top: 25px;
}

.note-card__line {
    width: 52px;
    height: 1px;

    background:
        rgba(15, 23, 42, 0.22);
}

.signature {
    margin: 0;

    color: var(--burgundy);

    font-family: var(--font-script);
    font-size: 48px;

    line-height: 1;
}


/* =========================================================
   10. SAVE THE DATE
========================================================= */

.date-section {
    padding:
        var(--section-padding) 0;

    overflow: hidden;

    background: var(--ivory);
}

.save-date {
    max-width: 570px;

    margin:
        14px auto 50px;

    padding:
        24px 18px;

    text-align: center;

    border-top:
        1px solid rgba(15, 23, 42, 0.2);

    border-bottom:
        1px solid rgba(15, 23, 42, 0.2);
}

.save-date__top {
    margin-bottom: 11px;

    color: var(--green);

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.35em;
}

.save-date__date {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(17px, 6vw, 34px);
}

.save-date__day {
    color: var(--green);

    font-family: var(--font-serif);
    font-size: clamp(100px, 32vw, 180px);
    font-weight: 400;

    letter-spacing: -0.08em;
    line-height: 0.8;
}

.save-date__meta {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding-left: 18px;

    text-align: left;
}

.save-date__meta::before {
    content: "";

    position: absolute;

    top: 1px;
    bottom: 1px;
    left: 0;

    width: 1px;

    background:
        rgba(15, 23, 42, 0.2);
}

.save-date__meta span {
    color: var(--ink-soft);

    font-size: clamp(11px, 2.8vw, 13px);
    font-weight: 600;

    letter-spacing: 0.16em;
}

.save-date__meta strong {
    margin-top: 3px;

    color: var(--ink);

    font-family: var(--font-serif);
    font-size: clamp(29px, 8vw, 44px);
    font-weight: 500;

    line-height: 1;
}

.save-date__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    margin-top: 22px;

    color:
        rgba(15, 23, 42, 0.55);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.17em;
}

.save-date__bottom i {
    width: 18px;
    height: 1px;

    background:
        rgba(15, 23, 42, 0.25);
}


/* ---------------------------------------------------------
   INFO CARDS
--------------------------------------------------------- */

.info-grid {
    display: grid;
    grid-template-columns: 1fr;

    gap: 14px;
}

.info-card {
    position: relative;

    overflow: hidden;

    min-height: 320px;

    display: flex;
    flex-direction: column;

    padding: 33px 27px 29px;

    border:
        1px solid rgba(15, 23, 42, 0.13);

    background: #fdfdfd;

    transition:
        transform 450ms var(--ease-out),
        box-shadow 450ms ease,
        border-color 450ms ease;
}

.info-card__number {
    position: absolute;
    top: 18px;
    right: 20px;
    color:
        rgba(15, 23, 42, 0.24);
    font-family: var(--font-serif);
    font-size: 15px;
}

.info-card__label {
    margin: 0 0 30px;

    color: var(--green);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.22em;
}

.info-card h3 {
    margin: 0;

    color: var(--ink);

    font-family: var(--font-serif);
    font-size: clamp(49px, 14vw, 70px);
    font-weight: 500;

    letter-spacing: -0.045em;
    line-height: 0.95;
}

.info-card h3.info-card__title-small {
    max-width: 240px;

    font-size: clamp(38px, 11vw, 52px);

    line-height: 0.88;
}

.info-card h3.info-card__dresscode {
    max-width: 280px;

    font-size: clamp(30px, 8vw, 41px);

    letter-spacing: -0.02em;
    line-height: 1.05;
}

.info-card__dresscode span {
    color: var(--gold);
}

.info-card__sub {
    margin: 8px 0 0;

    color:
        rgba(15, 23, 42, 0.5);

    font-size: 12px;
    font-weight: 500;

    letter-spacing: 0.12em;
}

.info-card__divider {
    width: 32px;
    height: 1px;

    margin:
        auto 0 20px;

    background: var(--gold);
}

.info-card__description {
    max-width: 300px;

    margin: 0;

    color: var(--ink-soft);

    font-family: var(--font-serif);
    font-size: 18px;

    line-height: 1.45;
}

.dress-colors {
    display: flex;
    gap: 7px;

    margin-top: 20px;
}

.dress-color {
    width: 24px;
    height: 24px;

    border-radius: 50%;

    border:
        1px solid rgba(15, 23, 42, 0.14);
}

.dress-color--black {
    background: #0f172a;
}

.dress-color--white {
    background: #fff;
}

.dress-color--beige {
    background: #94a3b8;
}


/* =========================================================
   11. COUNTDOWN
========================================================= */

.countdown-section {
    padding:
        clamp(100px, 22vw, 180px) 0;

    overflow: hidden;

    color: #f1f5f9;

    background:
        radial-gradient(circle at 50% 0,
            rgba(255, 255, 255, 0.06),
            transparent 38%),
        linear-gradient(145deg,
            var(--green),
            var(--green-deep));
}

.countdown-section__ring {
    position: absolute;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 50%;
}

.countdown-section__ring--one {
    width: 300px;
    height: 300px;

    top: -165px;
    right: -155px;
}

.countdown-section__ring--two {
    width: 230px;
    height: 230px;

    left: -140px;
    bottom: -120px;
}

.countdown-heading {
    position: relative;
    z-index: 2;

    margin-bottom: 58px;

    text-align: center;
}

.countdown-heading__script {
    margin:
        0 0 -2px;

    color: var(--gold-light);

    font-family: var(--font-script);
    font-size: clamp(38px, 10vw, 62px);

    line-height: 1;
}

.countdown-heading h2 {
    margin: 0;

    color: var(--cream-light);

    font-family: var(--font-serif);
    font-size: clamp(43px, 12vw, 72px);
    font-weight: 400;

    letter-spacing: -0.04em;
    line-height: 1;
}

.countdown {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns:
        1fr auto 1fr auto 1fr auto 1fr;

    align-items: start;

    width: 100%;

    margin-inline: auto;
}

.countdown__item {
    min-width: 0;

    text-align: center;
}

.countdown__item strong {
    display: block;

    color: #ffffff;

    font-family: var(--font-serif);
    font-size: clamp(39px, 12vw, 83px);
    font-weight: 400;

    letter-spacing: -0.055em;
    line-height: 1;
}

.countdown__item span {
    display: block;

    margin-top: 9px;

    color:
        rgba(255, 255, 255, 0.45);

    font-size: clamp(7px, 2vw, 9px);
    font-weight: 500;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.countdown__separator {
    padding-top: 3px;

    color:
        rgba(212, 189, 140, 0.52);

    font-family: var(--font-serif);
    font-size: clamp(28px, 8vw, 57px);

    line-height: 1;
}

.countdown-section__date {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    margin: 52px 0 0;

    color:
        rgba(255, 255, 255, 0.38);

    font-size: 7px;
    font-weight: 500;

    letter-spacing: 0.13em;
    text-align: center;
}

.countdown-section__date span {
    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: var(--gold);
}


/* =========================================================
   12. LOCATION
========================================================= */

.location-section {
    padding:
        var(--section-padding) 0;

    background: var(--cream);
}

.location-layout {
    display: grid;
    grid-template-columns: 1fr;

    gap: 50px;
}


/* ---------------------------------------------------------
   CSS MAP
--------------------------------------------------------- */

.map-card {
    position: relative;
    display: block;

    width: 100%;

    aspect-ratio: 1 / 0.88;

    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;

    border:
        1px solid rgba(15, 23, 42, 0.12);

    background:
        #e2e8f0;

    box-shadow: var(--shadow-card);
    transition:
        transform 350ms var(--ease-out),
        box-shadow 350ms var(--ease-out),
        border-color 350ms ease;
}

.map-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
}

.map-card:hover .map-pin {
    transform: translate(-50%, -75%) rotate(45deg) scale(1.1);
}

.map-card__click-hint {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;

    padding: 6px 14px;
    border-radius: 20px;

    background: rgba(30, 58, 138, 0.88);
    color: #ffffff;

    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;

    backdrop-filter: blur(4px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    transition: background 300ms ease, transform 300ms ease;
}

.map-card:hover .map-card__click-hint {
    background: var(--burgundy);
    transform: scale(1.05);
}

.map-card__grid {
    position: absolute;
    inset: 0;

    opacity: 0.18;

    background-image:
        linear-gradient(rgba(45, 58, 49, 0.18) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(45, 58, 49, 0.18) 1px,
            transparent 1px);

    background-size:
        31px 31px;
}

.map-road {
    position: absolute;

    height: 10px;

    border:
        1px solid rgba(113, 99, 79, 0.12);

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.78);
}

.map-road--one {
    width: 120%;

    top: 45%;
    left: -10%;

    transform: rotate(-23deg);
}

.map-road--two {
    width: 100%;

    top: 60%;
    left: 7%;

    transform: rotate(35deg);
}

.map-road--three {
    width: 74%;

    top: 24%;
    left: 30%;

    transform: rotate(79deg);
}

.map-area {
    position: absolute;

    border-radius:
        48% 52% 38% 62%;

    background:
        rgba(118, 145, 112, 0.17);
}

.map-area--one {
    width: 30%;
    height: 20%;

    top: 13%;
    left: 8%;
}

.map-area--two {
    width: 32%;
    height: 28%;

    right: 4%;
    bottom: 10%;
}

.map-location {
    position: absolute;

    z-index: 4;

    top: 50%;
    left: 52%;

    width: 60px;
    height: 60px;

    transform:
        translate(-50%, -50%);
}

.map-pin {
    position: absolute;
    z-index: 3;

    top: 50%;
    left: 50%;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform:
        translate(-50%, -65%) rotate(45deg);

    border-radius:
        50% 50% 50% 4px;

    background: var(--burgundy);

    box-shadow:
        0 6px 18px rgba(114, 47, 55, 0.28);
}

.map-pin span {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    transform: rotate(-45deg);

    background: var(--cream-light);
}

.map-location__pulse {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 46px;
    height: 46px;

    transform:
        translate(-50%, -50%);

    border:
        1px solid rgba(114, 47, 55, 0.28);

    border-radius: 50%;

    animation:
        mapPulse 2.4s ease-out infinite;
}

.map-card__label {
    position: absolute;
    z-index: 3;

    left: 17px;
    bottom: 17px;

    color: var(--ink-soft);

    font-size: 8px;
    font-weight: 600;

    letter-spacing: 0.15em;
}

.map-card__label span {
    display: block;

    margin-bottom: 3px;

    color: var(--green);

    font-family: var(--font-serif);
    font-size: 22px;

    letter-spacing: 0.04em;
}

.map-card__coordinates {
    position: absolute;
    z-index: 3;

    top: 16px;
    right: 16px;

    color:
        rgba(15, 23, 42, 0.4);

    font-family: var(--font-serif);
    font-size: 9px;

    line-height: 1.4;
    text-align: right;
}

.map-card__zoom {
    position: absolute;
    z-index: 3;

    right: 14px;
    bottom: 14px;

    display: flex;
    flex-direction: column;

    border:
        1px solid rgba(15, 23, 42, 0.12);
}

.map-card__zoom span {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--ink-soft);

    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;

    background:
        rgba(255, 255, 255, 0.85);
    transition:
        background 200ms ease,
        color 200ms ease;
}

.map-card__zoom span+span {
    border-top:
        1px solid rgba(15, 23, 42, 0.1);
}


/* ---------------------------------------------------------
   LOCATION INFO
--------------------------------------------------------- */

.location-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.location-info__eyebrow {
    margin: 0 0 12px;

    color: var(--green);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.23em;
}

.location-info h3 {
    margin: 0;

    color: var(--ink);

    font-family: var(--font-serif);
    font-size: clamp(42px, 12vw, 70px);
    font-weight: 500;

    letter-spacing: -0.045em;
    line-height: 0.93;
}

.location-info h3 span {
    display: block;

    color: var(--green);
    font-style: italic;
    font-weight: 400;
}

.location-info__divider {
    width: 40px;
    height: 1px;

    margin: 28px 0;

    background: var(--gold);
}

.location-info address {
    color: var(--ink-soft);

    font-family: var(--font-serif);
    font-size: 20px;

    line-height: 1.55;
}

.info-card__phones {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.info-card__phones a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-weight: 500;
    transition: color 200ms ease;
}

.info-card__phones a:hover {
    color: var(--burgundy);
}

.location-info__phones {
    margin: 20px 0 10px;
    padding: 14px 18px;
    background: rgba(30, 58, 138, 0.04);
    border-left: 3px solid var(--green);
    border-radius: 2px;
}

.location-info__phones-label {
    margin: 0 0 6px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--green);
    text-transform: uppercase;
}

.location-info__phones .phone-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 18px;
    margin-top: 4px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    transition: color 200ms ease, transform 200ms ease;
}

.location-info__phones .phone-link svg {
    color: var(--green);
    flex-shrink: 0;
}

.location-info__phones .phone-link:hover {
    color: var(--burgundy);
    transform: translateX(3px);
}

.location-info__phones .phone-link:hover svg {
    color: var(--burgundy);
}

.location-info__note {
    max-width: 390px;

    margin:
        22px 0 30px;

    color:
        rgba(15, 23, 42, 0.53);

    font-size: 12px;

    line-height: 1.8;
}


/* =========================================================
   13. RSVP
========================================================= */

.rsvp-section {
    overflow: hidden;

    padding:
        clamp(100px, 23vw, 180px) 0;

    background:
        linear-gradient(150deg,
            #fdfdfd,
            #e2e8f0);
}

.rsvp-section::before {
    content: "";

    position: absolute;

    top: -200px;
    left: 50%;

    width: min(90vw, 700px);
    aspect-ratio: 1;

    transform: translateX(-50%);

    border:
        1px solid rgba(30, 58, 138, 0.08);

    border-radius: 50%;
}

.rsvp-section__container {
    position: relative;
}

.rsvp-star {
    position: absolute;

    color:
        rgba(212, 175, 55, 0.65);
}

.rsvp-star--one {
    top: -30px;
    right: 4%;

    font-size: 15px;
}

.rsvp-star--two {
    left: 3%;
    bottom: -10px;

    font-size: 9px;
}

.rsvp-content {
    position: relative;
    z-index: 2;

    max-width: 800px;

    margin-inline: auto;

    text-align: center;
}

.rsvp-content__script {
    margin:
        0 0 2px;

    color: var(--burgundy);

    font-family: var(--font-script);
    font-size: clamp(37px, 10vw, 61px);

    line-height: 1;
}

.rsvp-content h2 {
    margin: 0;

    color: var(--ink);

    font-family: var(--font-serif);
    font-size: clamp(45px, 12vw, 80px);
    font-weight: 500;

    letter-spacing: -0.045em;
    line-height: 0.98;
}

.rsvp-content h2 em {
    display: block;

    color: var(--green);

    font-weight: 400;
}

.rsvp-content__description {
    max-width: 370px;

    margin:
        30px auto;

    color: var(--ink-soft);

    font-family: var(--font-serif);
    font-size: 20px;

    line-height: 1.55;
}

.rsvp-button {
    width: min(100%, 320px);
}

.rsvp-signature {
    margin:
        35px 0 0;

    color: var(--burgundy);

    font-family: var(--font-script);
    font-size: 34px;

    transform: rotate(-3deg);
}


/* =========================================================
   14. FOOTER
========================================================= */

.footer {
    position: relative;

    overflow: hidden;

    padding:
        52px 0 max(35px, env(safe-area-inset-bottom));

    color: rgba(255, 255, 255, 0.75);

    background: var(--green-deep);
}

.footer::before {
    content: "";

    position: absolute;

    width: 240px;
    height: 240px;

    top: -160px;
    left: 50%;

    transform: translateX(-50%);

    border:
        1px solid rgba(255, 255, 255, 0.06);

    border-radius: 50%;
}

.footer__container {
    position: relative;
    z-index: 2;

    text-align: center;
}

.footer__monogram {
    margin-bottom: 14px;

    color: var(--cream-light);

    font-family: var(--font-serif);
    font-size: 54px;
    font-weight: 500;

    letter-spacing: -0.08em;
    line-height: 1;
}

.footer__icon {
    margin-bottom: 16px;

    color: var(--cream-light);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0.9;
}

.footer__icon svg {
    width: 36px;
    height: 36px;
}

.footer__title {
    margin: 0;

    color:
        rgba(255, 255, 255, 0.5);

    font-size: 8px;
    font-weight: 500;

    letter-spacing: 0.22em;
}

.footer__title span {
    margin-inline: 5px;

    color: var(--gold);
}

.footer__line {
    width: 42px;
    height: 1px;

    margin: 32px auto;

    background:
        rgba(212, 189, 140, 0.5);
}

.footer__quote {
    margin: 0;

    color:
        rgba(255, 255, 255, 0.5);

    font-family: var(--font-serif);
    font-size: 15px;
    font-style: italic;
}

.footer__quote span {
    color: var(--gold-light);
}

.footer__copyright {
    margin: 28px 0 0;

    color:
        rgba(255, 255, 255, 0.25);

    font-size: 7px;
    font-weight: 500;

    letter-spacing: 0.18em;
}

.footer__credits {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.08em;
}


/* =========================================================
   15. SCROLL REVEAL
========================================================= */

.reveal {
    opacity: 0;

    transform:
        translate3d(0, 34px, 0);

    transition:
        opacity 850ms var(--ease-out),
        transform 850ms var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;

    transform:
        translate3d(0, 0, 0);
}

.info-grid .reveal:nth-child(2) {
    transition-delay: 90ms;
}

.info-grid .reveal:nth-child(3) {
    transition-delay: 180ms;
}


/* =========================================================
   16. KEYFRAMES
========================================================= */

@keyframes hintLine {
    0% {
        transform:
            translateY(0);
    }

    50%,
    100% {
        transform:
            translateY(200%);
    }
}

@keyframes sealRelease {
    0% {
        opacity: 1;

        transform:
            translate(-50%, -50%) rotate(-5deg) scale(1) translateZ(4px);
    }

    35% {
        opacity: 1;

        transform:
            translate(-50%, -50%) rotate(-2deg) scale(1.1) translateZ(4px);
    }

    100% {
        opacity: 0;

        transform:
            translate(-50%, -50%) rotate(7deg) scale(0.72) translateZ(4px);
    }
}

@keyframes flapOpen {
    0% {
        z-index: 6;

        transform:
            rotateX(0deg) translateZ(3px);
    }

    50% {
        z-index: 6;
    }

    99% {
        z-index: 6;
    }

    100% {
        z-index: 1;

        transform:
            rotateX(180deg) translateZ(-3px);
    }
}

@keyframes letterRise {
    0% {
        z-index: 2;

        transform:
            translateY(4%) translateZ(1px);
    }

    30% {
        z-index: 3;
    }

    100% {
        z-index: 7;

        transform:
            translateY(-64%) translateZ(8px);
    }
}

@keyframes shadowChange {
    0% {
        opacity: 0.5;

        transform:
            scaleX(1);
    }

    100% {
        opacity: 0.2;

        transform:
            scaleX(0.8);
    }
}

@keyframes envelopeLeave {
    0% {
        opacity: 1;

        transform:
            translate3d(0, 0, 0) scale(1);
    }

    100% {
        opacity: 0;

        transform:
            translate3d(0, 80px, 0) scale(0.94);
    }
}

@keyframes introCopyLeave {
    0% {
        opacity: 1;

        transform:
            translateY(0);
    }

    100% {
        opacity: 0;

        transform:
            translateY(-24px);
    }
}

@keyframes fadeAway {
    to {
        opacity: 0;
    }
}

@keyframes introScreenLeave {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes invitationEnter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes heroFadeUp {
    from {
        opacity: 0;

        transform:
            translate3d(0, 28px, 0);
    }

    to {
        opacity: 1;

        transform:
            translate3d(0, 0, 0);
    }
}

@keyframes heroPortraitEnter {
    from {
        opacity: 0;

        transform:
            translate3d(0, 40px, 0) scale(0.97);
    }

    to {
        opacity: 1;

        transform:
            translate3d(0, 0, 0) scale(1);
    }
}

@keyframes starRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes mapPulse {
    0% {
        opacity: 0.9;

        transform:
            translate(-50%, -50%) scale(0.5);
    }

    80%,
    100% {
        opacity: 0;

        transform:
            translate(-50%, -50%) scale(1.7);
    }
}


/* =========================================================
   17. 375px+
========================================================= */

@media (min-width: 375px) {

    .container {
        width:
            min(calc(100% - 48px),
                var(--container));
    }

    .note-card {
        padding:
            64px 34px 42px;
    }

    .info-card {
        padding:
            36px 30px 31px;
    }

}


/* =========================================================
   18. TABLET (700px - 959px)
========================================================= */

@media (min-width: 700px) {

    .container {
        width:
            min(calc(100% - 80px),
                var(--container));
    }

    .intro-container {
        width: min(100%, 570px);
    }

    .envelope-stage {
        width: min(65vw, 420px);
    }

    .hero {
        padding-top: 77px;
        padding-bottom: 56px;
    }

    .hero__portrait-wrap {
        width: min(70%, 460px);
        margin-inline: auto;
    }

    .note-card {
        width: 86%;
        margin-inline: auto;
        padding: 75px 60px 48px;
    }

    .info-grid {
        grid-template-columns:
            repeat(3, 1fr);
        gap: 16px;
    }

    .info-grid .info-card:last-child {
        grid-column: auto;
    }

    .info-card {
        padding: 34px 22px 28px;
        min-height: 370px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .save-date {
        max-width: 540px;
        margin-inline: auto;
        padding: 40px 30px;
    }

    .countdown {
        max-width: 790px;
        gap: 20px;
    }

    .location-layout {
        gap: 60px;
    }

    .map-card {
        max-width: 650px;
        margin-inline: auto;
    }

}


/* =========================================================
   19. DESKTOP (960px+)
========================================================= */

@media (min-width: 960px) {

    .button:hover {
        transform: translateY(-2px);
    }

    .button:hover i {
        transform:
            translate(3px, -3px);
    }

    .button--outline:hover {
        color: var(--cream-light);
        background: var(--green);

        border-color: var(--green);
    }

    .hero {
        display: flex;
        align-items: center;

        padding:
            70px 0 56px;
    }

    .hero__container {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr) minmax(380px, 470px);

        align-items: center;

        gap: clamp(50px, 6vw, 90px);
    }

    .hero__content {
        text-align: left;
    }

    .hero__eyebrow {
        margin-bottom: 38px;
    }

    .hero__script {
        margin-left: 6px;
    }

    .hero__name {
        font-size: clamp(76px, 7vw, 114px);
    }

    .hero__divider {
        width: 230px;

        margin:
            35px 0;
    }

    .hero__description {
        max-width: 440px;

        margin: 0;

        font-size: 21px;
    }

    .hero__date-mini {
        justify-content: flex-start;
    }

    .hero__portrait-wrap {
        width: 100%;
        max-width: 470px;

        margin:
            0 0 0 auto;
    }

    .class-badge {
        right: -35px;

        width: 94px;
        height: 94px;
    }

    .class-badge span {
        font-size: 24px;
    }

    .class-badge strong {
        font-size: 24px;
    }

    .scroll-note {
        bottom: 28px;
        left: 50%;
        transform: translateX(-50%);

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;

        color: rgba(15, 23, 42, 0.38);

        font-size: 8px;
        font-weight: 600;

        letter-spacing: 0.22em;
    }

    .scroll-note i {
        width: 48px;
        height: 1px;

        background: rgba(15, 23, 42, 0.25);
    }


    /* Note */

    .note-section .section-heading {
        margin-bottom: -56px;
    }

    .note-card {
        width: min(800px, 78%);

        padding:
            90px 85px 58px;
    }


    /* Cards */

    .info-grid {
        grid-template-columns:
            repeat(3, 1fr);

        gap: 22px;
    }

    .info-grid .info-card:last-child {
        grid-column: auto;
    }

    .info-card {
        min-height: 400px;
        padding: 42px 34px 34px;
    }

    .info-card:hover {
        transform:
            translateY(-8px);

        border-color:
            rgba(30, 58, 138, 0.25);

        box-shadow:
            0 24px 60px rgba(32, 38, 31, 0.08);
    }


    /* Location */

    .location-layout {
        grid-template-columns:
            minmax(0, 1.15fr) minmax(360px, 0.85fr);

        align-items: center;

        gap: clamp(50px, 6vw, 90px);
    }

    .map-card {
        max-width: none;

        margin: 0;
    }

}


/* =========================================================
   20. LARGE DESKTOP (1200px+)
========================================================= */

@media (min-width: 1200px) {

    .hero__container {
        gap: 120px;
    }

    .hero__portrait-wrap {
        width: 500px;
    }

    .section-heading {
        margin-bottom: 70px;
    }

    .info-card {
        padding:
            42px 38px 35px;
    }

}


/* =========================================================
   21. VERY SMALL PHONES
========================================================= */

@media (max-width: 350px) {

    .intro-screen {
        padding-left: 16px;
        padding-right: 16px;
    }

    .intro-copy {
        margin-bottom: 30px;
    }

    .intro-copy__eyebrow {
        font-size: 8px;
    }

    .intro-copy__title {
        font-size: 35px;
    }

    .envelope-stage {
        width: min(87vw, 280px);
    }

    .open-hint {
        margin-top: 20px;
    }

    .intro-footer {
        margin-top: 19px;
    }

    .hero__name {
        font-size: 53px;
    }

    .countdown__item strong {
        font-size: 35px;
    }

    .countdown__separator {
        font-size: 24px;
    }

}


/* =========================================================
   22. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

}


/* =========================================================
   23. RSVP THANK YOU MODAL
========================================================= */

body.is-locked-modal {
    overflow: hidden;
}

.rsvp-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 400ms var(--ease-out),
        visibility 400ms var(--ease-out);
}

.rsvp-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rsvp-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rsvp-modal__card {
    position: relative;
    z-index: 2;

    width: min(100%, 480px);

    padding: clamp(32px, 7vw, 46px) clamp(24px, 6vw, 40px);

    background: var(--ivory);
    border: 1px solid var(--beige);
    box-shadow: 0 30px 90px rgba(17, 24, 20, 0.3);

    text-align: center;

    transform: translateY(20px) scale(0.95);
    transition: transform 400ms var(--ease-out);
}

.rsvp-modal.is-active .rsvp-modal__card {
    transform: translateY(0) scale(1);
}

.rsvp-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    outline: 0;
    background: transparent;

    color: var(--ink-soft);
    font-size: 20px;
    line-height: 1;

    cursor: pointer;
    border-radius: 50%;

    transition: background 200ms ease, color 200ms ease;
}

.rsvp-modal__close:hover {
    background: rgba(30, 58, 138, 0.08);
    color: var(--burgundy);
}

.rsvp-modal__icon {
    font-size: 32px;
    margin-bottom: 12px;
    animation: modalPulse 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes modalPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }
}

.rsvp-modal__eyebrow {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.25em;
}

.rsvp-modal__title {
    margin: 0 0 12px;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: clamp(28px, 6vw, 40px);
    font-weight: 500;
    line-height: 1.12;
}

.rsvp-modal__title span {
    color: var(--burgundy);
    font-family: var(--font-script);
    font-size: 1.18em;
    font-weight: 400;
}

.rsvp-modal__divider {
    width: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px auto 22px;
}

.rsvp-modal__divider span {
    height: 1px;
    flex: 1;
    background: rgba(15, 23, 42, 0.18);
}

.rsvp-modal__divider i {
    color: var(--gold);
    font-size: 10px;
    font-style: normal;
}

.rsvp-modal__message {
    margin: 0 0 14px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.7;
}

.rsvp-modal__submessage {
    margin: 0 0 28px;
    color: var(--green);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

.rsvp-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rsvp-modal__actions .button {
    width: 100%;
}


/* =========================================================
   24. GUEST NAME CREATOR MODAL
========================================================= */

.name-modal {
    position: fixed;
    z-index: 10001;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 400ms var(--ease-out),
        visibility 400ms var(--ease-out);
}

.name-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.name-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.name-modal__card {
    position: relative;
    z-index: 2;

    width: min(100%, 490px);

    padding: clamp(28px, 6vw, 42px) clamp(22px, 5vw, 36px);

    background: var(--ivory);
    border: 1px solid var(--beige);
    box-shadow: 0 35px 100px rgba(17, 24, 20, 0.35);

    text-align: center;

    transform: translateY(20px) scale(0.95);
    transition: transform 400ms var(--ease-out);
}

.name-modal.is-active .name-modal__card {
    transform: translateY(0) scale(1);
}

.name-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    outline: 0;
    background: transparent;

    color: var(--ink-soft);
    font-size: 20px;
    line-height: 1;

    cursor: pointer;
    border-radius: 50%;

    transition: background 200ms ease, color 200ms ease;
}

.name-modal__close:hover {
    background: rgba(30, 58, 138, 0.08);
    color: var(--burgundy);
}

.name-modal__icon {
    font-size: 34px;
    margin-bottom: 8px;
}

.name-modal__eyebrow {
    margin: 0 0 8px;
    color: var(--green);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.25em;
}

.name-modal__title {
    margin: 0 0 8px;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: clamp(26px, 5vw, 36px);
    font-weight: 500;
    line-height: 1.15;
}

.name-modal__subtitle {
    margin: 0 0 22px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.6;
}

.name-modal__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.name-modal__input-group {
    width: 100%;
}

.name-modal__input {
    width: 100%;
    height: 52px;

    padding: 0 18px;

    border: 1px solid var(--beige-dark);
    background: var(--cream-light);
    color: var(--ink);

    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    text-align: center;

    outline: none;
    transition: border-color 250ms ease, box-shadow 250ms ease;
}

.name-modal__input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.name-modal__submit-btn {
    width: 100%;
}

/* Result box */
.name-modal__result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.result-success-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(30, 58, 138, 0.08);
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 20px;
}

.result-label {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.result-label strong {
    color: var(--burgundy);
}

.result-url-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-url-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--beige-dark);
    background: var(--cream);
    color: var(--ink);
    font-family: monospace;
    font-size: 13px;
    text-align: center;
    border-radius: 0;
    outline: none;
}

.copy-btn {
    width: 100%;
    transition: background 250ms ease !important;
}

.result-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.result-actions .button {
    width: 100%;
}

.button--outline-gold {
    color: #b45309;
    border: 1px solid rgba(212, 175, 55, 0.6);
    background: transparent;
}

.button--outline-gold:hover {
    border-color: var(--gold);
    color: var(--ink);
    background: rgba(212, 175, 55, 0.08);
}


/* =========================================================
   25. MODAL RESPONSIVENESS (TABLET & DESKTOP)
========================================================= */

@media (min-width: 600px) {

    .name-modal__card,
    .rsvp-modal__card {
        width: min(90vw, 520px);
        padding: 44px 38px;
    }

    .result-url-box {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .result-url-input {
        flex: 1;
        height: 52px;
    }

    .copy-btn {
        width: auto;
        height: 52px;
        padding: 0 24px;
        white-space: nowrap;
    }

    .result-actions {
        flex-direction: row;
        gap: 12px;
    }

    .result-actions .button {
        flex: 1;
    }

    .rsvp-modal__actions {
        flex-direction: row;
        gap: 12px;
    }

    .rsvp-modal__actions .button {
        flex: 1;
    }
}


/* =========================================================
   26. FLOATING MUSIC TOGGLE BUTTON
========================================================= */

.music-toggle-btn {
    position: fixed;
    z-index: 9999;
    bottom: 24px;
    right: 24px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    width: 48px;
    height: 48px;
    padding: 0;

    border: 1px solid var(--gold);
    border-radius: 50%;
    background: var(--ivory);
    color: var(--green);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);

    cursor: pointer;
    outline: none;
    transition:
        transform 300ms var(--ease-out),
        background 300ms ease,
        box-shadow 300ms ease;
}

.music-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.25);
    background: #ffffff;
}

.music-toggle-btn.is-playing {
    border-color: var(--gold);
    background: #fdfdfd;
}

.music-toggle-btn.is-playing .music-toggle-btn__icon {
    animation: rotateMusic 4s linear infinite;
    color: var(--burgundy);
}

.music-toggle-btn__waves {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    margin-right: 2px;
}

.music-toggle-btn.is-playing .music-toggle-btn__waves {
    display: flex;
}

.music-toggle-btn__waves span {
    width: 2px;
    height: 100%;
    background: var(--gold);
    border-radius: 1px;
    animation: soundWave 1.2s ease-in-out infinite alternate;
}

.music-toggle-btn__waves span:nth-child(2) {
    animation-delay: 0.3s;
}

.music-toggle-btn__waves span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes rotateMusic {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes soundWave {
    0% {
        height: 3px;
    }

    100% {
        height: 12px;
    }
}
