
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Dancing+Script:wght@500;600;700&family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --navy: #101e32;
    --navy-light: #203b57;
    --gold: #d7b875;
    --cream: #fff3dc;
    --ivory: #f8f0e5;
    --burgundy: #743b4b;
    --rose: #d58b91;
    --ink: #382b2c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: var(--navy);
    font-family: 'DM Sans', sans-serif;
    color: var(--cream);
}

button { font-family: inherit; }

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 5px;
}

img { max-width: 100%; }

[hidden] { display: none !important; }

/* SHARED PAGE ELEMENTS */

.page-section {
    min-height: 100vh;
    padding: 90px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.section-inner {
    width: 100%;
    max-width: 1000px;
    margin: auto;
    text-align: center;
}

.section-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.script-heading {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(48px, 8vw, 76px);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 22px;
}

.section-description {
    max-width: 620px;
    margin: 0 auto 35px;
    font-size: 16px;
    line-height: 1.9;
}

.primary-button,
.secondary-button {
    display: inline-block;
    border: 1px solid var(--gold);
    border-radius: 40px;
    padding: 15px 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s ease;
}

.primary-button {
    background: var(--gold);
    color: var(--navy);
}

.secondary-button {
    background: transparent;
    color: var(--gold);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover {
    transform: translateY(-3px);
    background: transparent;
    color: var(--gold);
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* PAGE 1 — THE INVITATION */

.opening-screen {
    min-height: 100vh;
    min-height: 100svh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 85px 20px 115px;
    background-image: url("./birthday-background.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #101e32;
}

.opening-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(8,17,31,0.28) 0%,
        rgba(8,17,31,0.40) 35%,
        rgba(8,17,31,0.48) 70%,
        rgba(8,17,31,0.28) 100%
    );
}

.top-note {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
    z-index: 3;
    color: #ffe7ae;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.95),
                 0 0 18px rgba(255,215,145,0.65);
}

.opening-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    width: 100%;
    text-align: center;
    animation: fadeUp 1s ease both;
    padding: 25px 20px;
    border-radius: 24px;
    background: rgba(8,19,35,0.22);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.eyebrow {
    color: #ffe4a3;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 30px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.95),
                 0 0 18px rgba(255,220,150,0.65);
}

.opening-content h1 {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(58px, 10vw, 90px);
    line-height: 1.12;
    color: #fff3dc;
    margin-bottom: 20px;
    text-shadow: 0 4px 25px rgba(0,0,0,0.75);
}

.birthday-date {
    color: #ffe1a0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 25px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

.intro-text {
    max-width: 440px;
    margin: auto;
    color: #fff4e4;
    font-size: 16px;
    line-height: 1.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}

/* ENVELOPE */

.envelope-area {
    margin: 45px auto 20px;
    width: 190px;
    height: 155px;
    perspective: 800px;
    position: relative;
    z-index: 4;
}

.envelope {
    width: 190px;
    height: 125px;
    position: absolute;
    bottom: 0;
    background: #d8c3a0;
    border-radius: 5px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.envelope-back {
    position: absolute;
    inset: 0;
    background: #e7d4b3;
    border-radius: 5px;
    z-index: 0;
}

.envelope-letter {
    position: absolute;
    left: 15px;
    right: 15px;
    top: 10px;
    height: 85px;
    background: #fff8e9;
    color: #253b53;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Caveat', cursive;
    font-size: 25px;
    border-radius: 3px;
    z-index: 1;
    transition: transform 1s ease;
}

.envelope-front {
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, #c7a77e, #ead7b7);
    clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
    z-index: 3;
}

.envelope-flap {
    position: absolute;
    inset: 0;
    background: #f0dfc2;
    clip-path: polygon(0 0, 100% 0, 50% 60%);
    transform-origin: top center;
    transition: transform 0.7s ease;
    z-index: 4;
}

.envelope-heart {
    position: absolute;
    top: 56%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9b5260;
    font-size: 24px;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.envelope.opened .envelope-flap {
    transform: rotateX(180deg);
    z-index: 0;
}

.envelope.opened .envelope-letter {
    transform: translateY(-95px);
    transition-delay: 0.35s;
}

.envelope.opened .envelope-heart { opacity: 0; }

.envelope-hint {
    font-family: 'Caveat', cursive;
    font-size: 25px;
    color: #ffe3ae;
    margin: 15px 0 22px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

.open-button,
.cake-button,
.blow-button {
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #172b40;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 18px rgba(0,0,0,0.25);
}

.open-button:hover,
.cake-button:hover,
.blow-button:hover {
    background: transparent;
    color: #f1dba8;
    transform: translateY(-3px);
}

.open-button:disabled,
.blow-button:disabled {
    opacity: 0.7;
    cursor: default;
}

.bottom-note {
    position: relative;
    width: 100%;
    text-align: center;
    z-index: 3;
    margin-top: 22px;
    color: #f2d69b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

/* PAGE 2 — MIDNIGHT BIRTHDAY CELEBRATION */

.about-page {
    background: #101e32;
}

/* The same birthday image continues through Page 2.
   The dark overlay protects text readability. */

.about-hero,
.interests-section,
.cake-section {
    background-image:
        linear-gradient(
            145deg,
            rgba(12,26,46,0.48),
            rgba(16,30,50,0.60)
        ),
        url("./about-balloons.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.about-hero {
    background-image:
        linear-gradient(
            145deg,
            rgba(12,26,46,0.38),
            rgba(16,30,50,0.48)
        ),
        url("./about-balloons.png");
}

.interests-section {
    background-image:
        linear-gradient(
            145deg,
            rgba(12,26,46,0.58),
            rgba(16,30,50,0.66)
        ),
        url("./about-balloons.png");
}

.cake-section {
    background-image:
        linear-gradient(
            145deg,
            rgba(12,26,46,0.45),
            rgba(16,30,50,0.58)
        ),
        url("./about-balloons.png");
}

.about-hero .section-kicker,
.interests-section .section-kicker,
.cake-section .section-kicker {
    color: var(--gold);
}

.about-hero .script-heading,
.interests-section .script-heading,
.cake-section .script-heading {
    color: var(--cream);
}

.about-hero .section-description,
.interests-section .section-description,
.cake-section .section-description {
    color: #d8e0e8;
}

.dudu-gif {
    width: 230px;
    max-width: 75%;
    margin: 25px auto;
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(215,184,117,0.45);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.dudu-gif img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.birthday-message {
    max-width: 500px;
    margin: 0 auto 25px;
    color: #e1e7ed;
    font-size: 16px;
    line-height: 1.9;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 45px auto;
    max-width: 820px;
}

.interest-card {
    min-height: 210px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 30px 20px;
    border: 1px solid rgba(215,184,117,0.35);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.interest-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
}

.interest-card .interest-number {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 18px;
}

.interest-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(21px, 3vw, 30px);
    color: var(--cream);
    font-weight: 500;
    margin-bottom: 12px;
}

.interest-card p {
    color: #d7dfe8;
    font-size: 13px;
    line-height: 1.7;
    max-width: 280px;
}

.interest-card .interest-detail {
    color: #f1dba8;
    font-family: 'Caveat', cursive;
    font-size: 21px;
    margin-top: 12px;
}

.interest-card[aria-expanded="false"] .interest-detail { display: none; }

.interest-card[aria-expanded="true"] {
    background: rgba(215,184,117,0.10);
}

.cake-scene {
    width: 290px;
    height: 250px;
    position: relative;
    margin: 35px auto 25px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    filter: drop-shadow(0 15px 20px rgba(0,0,0,0.25));
}

.cake-plate {
    position: absolute;
    bottom: 0;
    width: 290px;
    height: 18px;
    background: linear-gradient(#f2dfbd, #bda47f);
    border-radius: 50%;
}

.cake-bottom {
    position: absolute;
    bottom: 15px;
    width: 245px;
    height: 75px;
    background: linear-gradient(90deg, #9d5361, #d58b91, #9d5361);
    border-radius: 12px 12px 18px 18px;
    border-bottom: 8px solid #874655;
}

.cake-middle {
    position: absolute;
    bottom: 83px;
    width: 220px;
    height: 62px;
    background: linear-gradient(90deg, #e5c6a4, #fff0d7, #d7b48e);
    border-radius: 12px 12px 15px 15px;
}

.cake-top {
    position: absolute;
    bottom: 137px;
    width: 220px;
    height: 22px;
    background: #fff0d7;
    border-radius: 50%;
    border-bottom: 5px solid #d8b48f;
}

.cake-candles {
    position: absolute;
    bottom: 157px;
    display: flex;
    gap: 28px;
    z-index: 3;
}

.candle {
    width: 10px;
    height: 47px;
    border-radius: 4px;
    background: repeating-linear-gradient(135deg, #fff0d7 0px, #fff0d7 5px, #c28c94 5px, #c28c94 9px);
    position: relative;
}

.flame {
    position: absolute;
    width: 13px;
    height: 21px;
    left: -1.5px;
    top: -23px;
    border-radius: 50% 50% 45% 45%;
    background: radial-gradient(ellipse at 50% 70%, #fff6bd 5%, #ffcf62 45%, #f18c36 75%);
    box-shadow: 0 0 14px 5px rgba(255,185,78,0.4);
    transform-origin: center bottom;
    animation: flameFlicker 0.7s ease-in-out infinite alternate;
}

.smoke {
    position: absolute;
    width: 9px;
    height: 20px;
    left: 1px;
    top: -24px;
    border-radius: 50%;
    background: rgba(225,232,238,0.55);
    filter: blur(3px);
    pointer-events: none;
    animation: smokeRise 1.5s ease-out forwards;
}

.cake-instruction {
    font-family: 'Caveat', cursive;
    font-size: 27px;
    color: #e0c58d;
    margin-bottom: 22px;
}

.confetti {
    position: absolute;
    width: 9px;
    height: 14px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 10;
    animation: confettiBurst 2.2s ease-out forwards;
}

.next-page-section {
    padding: 70px 20px;
    background: #0d192a;
    text-align: center;
}

.next-page-section p {
    font-family: 'Caveat', cursive;
    font-size: 29px;
    color: #f0d69f;
    margin-bottom: 22px;
}

/* PAGE 3 — ALL THE LITTLE THINGS */

.little-things-page {
    background: #f5e9dc;
    color: var(--ink);
}

.little-section {
    min-height: 75vh;
    padding: 100px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.little-inner {
    width: 100%;
    max-width: 1050px;
    margin: auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.little-kicker {
    color: #a16c70;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3.5px;
    line-height: 1.8;
    margin-bottom: 18px;
}

.little-heading {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(45px, 7vw, 72px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--burgundy);
    margin-bottom: 22px;
}

.little-description {
    max-width: 650px;
    margin: 0 auto 38px;
    color: #705d5b;
    font-size: 15px;
    line-height: 1.9;
}

/* A LITTLE US */

.memories-section {
    background:
        radial-gradient(ellipse at 12% 18%, rgba(213,139,145,0.24), transparent 38%),
        radial-gradient(ellipse at 88% 82%, rgba(215,184,117,0.22), transparent 40%),
        linear-gradient(135deg, #f5e7dc, #fff9f0 50%, #ead8cc);
}

.memories-section::before,
.memories-section::after {
    content: "✧";
    position: absolute;
    color: rgba(116,59,75,0.16);
    font-size: 130px;
    font-family: 'Playfair Display', serif;
    z-index: -1;
}

.memories-section::before {
    top: 8%;
    left: 5%;
    transform: rotate(-15deg);
}

.memories-section::after {
    bottom: 7%;
    right: 6%;
    transform: rotate(15deg);
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    max-width: 950px;
    margin: 42px auto 0;
}

.memory-card {
    min-height: 230px;
    padding: 30px 23px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    border: 1px solid #e5d0c4;
    border-radius: 5px;
    background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(255,247,237,0.96));
    box-shadow: 0 13px 30px rgba(86,48,54,0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.memory-card:nth-child(odd) { transform: rotate(-1deg); }
.memory-card:nth-child(even) { transform: rotate(1deg); }

.memory-card:hover {
    transform: translateY(-6px) rotate(0);
    box-shadow: 0 18px 35px rgba(86,48,54,0.13);
}

.memory-number {
    color: #bd9279;
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    letter-spacing: 3px;
    margin-bottom: 22px;
}

.memory-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--burgundy);
    font-size: 21px;
    font-weight: 500;
    margin-bottom: 13px;
}

.memory-card p {
    color: #796567;
    font-size: 13px;
    line-height: 1.9;
}

/* LITTLE THINGS I LOVE */

.love-section {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.85), transparent 55%),
        linear-gradient(145deg, #ead5d0, #f8ebe2 52%, #e8d4ca);
}

.love-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 920px;
    margin: 42px auto 0;
}

.love-card {
    min-height: 175px;
    padding: 25px 18px;
    border: 1px solid rgba(116,59,75,0.20);
    border-radius: 10px;
    background: rgba(255,250,244,0.9);
    box-shadow: 0 8px 22px rgba(86,48,54,0.07);
    color: var(--burgundy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.love-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 28px rgba(86,48,54,0.13);
}

.love-card-front {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    line-height: 1.5;
}

.love-reveal {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: 22px;
    line-height: 1.5;
    color: #80535a;
}

.love-card:has(.love-reveal:not([hidden])) {
    background: #f4e5e1;
    border-color: #c99791;
}

/* A SMALL REMINDER */

.reminder-section {
    background:
        radial-gradient(circle at 15% 20%, rgba(213,139,145,0.22), transparent 36%),
        radial-gradient(circle at 90% 85%, rgba(215,184,117,0.18), transparent 35%),
        linear-gradient(145deg, #653544, #874b59, #582d3d);
    color: #fff4e7;
}

.reminder-section .little-kicker { color: #e7c99b; }
.reminder-section .little-heading { color: #fff2e5; }

.reminder-note {
    max-width: 730px;
    margin: 38px auto 0;
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid rgba(240,211,180,0.35);
    background: rgba(255,245,232,0.08);
    box-shadow: 0 15px 40px rgba(35,14,23,0.16);
    backdrop-filter: blur(3px);
    position: relative;
}

.reminder-heart {
    display: block;
    font-family: 'Dancing Script', cursive;
    font-size: 40px;
    color: #f0d19e;
    margin-bottom: 20px;
}

.reminder-note p {
    font-family: 'Caveat', cursive;
    font-size: clamp(23px, 3.5vw, 30px);
    line-height: 1.8;
    color: #fff0e5;
    margin-bottom: 18px;
}

.reminder-signature {
    display: block;
    font-family: 'Dancing Script', cursive;
    font-size: 29px;
    color: #f0d19e;
    margin-top: 28px;
}

/* FLOWERS */

.flowers-section {
    background:
        radial-gradient(ellipse at 10% 20%, rgba(213,139,145,0.20), transparent 38%),
        radial-gradient(ellipse at 90% 80%, rgba(137,157,118,0.15), transparent 38%),
        linear-gradient(145deg, #f8f1e7, #fffaf2 52%, #eee2d5);
}

.flower-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    margin: 40px auto 30px;
}

.flower-card {
    min-width: 0;
    background: #fffaf3;
    border: 1px solid #e5d4c5;
    border-radius: 12px;
    padding: 10px;
    color: var(--burgundy);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(76,43,43,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flower-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 28px rgba(76,43,43,0.13);
}

.flower-card img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 7px;
    margin-bottom: 12px;
}

.flower-name,
.flower-tap {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    line-height: 1.5;
    padding: 4px 2px;
}

.flower-tap {
    color: #a77c77;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
}

.flower-card.revealed {
    border-color: #a96e77;
    background: #f4e5e1;
}

.flower-card.revealed .flower-tap { color: var(--burgundy); }

.flower-wish-panel {
    max-width: 650px;
    min-height: 90px;
    margin: 25px auto;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fffaf3;
    border: 1px solid #e5d4c5;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(76,43,43,0.06);
    font-family: 'Caveat', cursive;
    font-size: 25px;
    line-height: 1.5;
    color: var(--burgundy);
}

.bouquet-invitation {
    margin-top: 30px;
    color: #80535a;
    font-family: 'Caveat', cursive;
    font-size: 25px;
}

.bouquet-button {
    margin-top: 15px;
    padding: 14px 28px;
    border: 1px solid var(--burgundy);
    border-radius: 35px;
    background: var(--burgundy);
    color: #fff4e7;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s ease;
}

.bouquet-button:hover {
    background: transparent;
    color: var(--burgundy);
}

.bouquet-reveal {
    margin: 35px auto 0;
    padding: 35px 20px;
    max-width: 650px;
    background: #fffaf3;
    border: 1px solid #e5d4c5;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(76,43,43,0.08);
    animation: fadeUp 0.8s ease both;
}

.bouquet-reveal h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 36px;
    color: var(--burgundy);
    margin-bottom: 12px;
}

.bouquet-reveal p {
    font-family: 'Caveat', cursive;
    font-size: 24px;
    color: #80535a;
}

/* OPEN WHEN */

.open-when-section {
    background:
        radial-gradient(circle at 85% 15%, rgba(213,139,145,0.18), transparent 35%),
        radial-gradient(circle at 12% 85%, rgba(215,184,117,0.16), transparent 35%),
        linear-gradient(135deg, #eee0d3, #fff8ee 52%, #f0e2d6);
}

.letter-list {
    max-width: 750px;
    margin: 35px auto;
    display: grid;
    gap: 15px;
    text-align: left;
}

.letter-item {
    background: #fffaf3;
    border: 1px solid #e4d2c2;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 7px 20px rgba(76,43,43,0.05);
    transition: box-shadow 0.3s ease;
}

.letter-item:has(.letter-content:not([hidden])) {
    box-shadow: 0 12px 28px rgba(76,43,43,0.10);
}

.letter-toggle {
    width: 100%;
    border: 0;
    background: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    color: var(--burgundy);
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}

.letter-toggle span {
    color: #b18a75;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.letter-toggle[aria-expanded="true"] span { transform: rotate(45deg); }

.letter-content {
    padding: 20px 5px 5px;
    color: #67585a;
    font-size: 15px;
    line-height: 1.9;
    border-top: 1px solid #eadbd0;
    margin-top: 18px;
}

/* A LETTER, JUST FOR YOU */

.final-letter-section {
    background:
        radial-gradient(ellipse at 90% 10%, rgba(213,139,145,0.18), transparent 40%),
        radial-gradient(ellipse at 8% 90%, rgba(215,184,117,0.16), transparent 38%),
        linear-gradient(145deg, #f5e9dc, #fff8ee 55%, #ead8cc);
}

.letter-paper {
    max-width: 750px;
    margin: 38px auto 0;
    padding: clamp(30px, 5vw, 60px);
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,250,243,0.97) 0,
        rgba(255,250,243,0.97) 37px,
        rgba(166,123,109,0.12) 38px
    );
    border: 1px solid #e5d4c5;
    box-shadow: 0 15px 40px rgba(76,43,43,0.10);
    text-align: left;
    position: relative;
}

.letter-paper::before {
    content: "♡";
    position: absolute;
    top: 15px;
    right: 22px;
    font-family: 'Dancing Script', cursive;
    font-size: 35px;
    color: #d5a1a0;
}

.letter-paper p {
    font-family: 'Caveat', cursive;
    font-size: 23px;
    line-height: 1.8;
    color: #60464a;
    margin-bottom: 18px;
}

.letter-paper .letter-greeting {
    font-family: 'Dancing Script', cursive;
    font-size: 34px;
    color: var(--burgundy);
    margin-bottom: 20px;
}

.letter-paper .letter-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 31px;
    color: var(--burgundy);
    margin-top: 28px;
}

/* ONE LAST THING */

.last-section {
    min-height: 90vh;
    background:
        radial-gradient(circle at 50% 35%, rgba(213,139,145,0.28), transparent 44%),
        radial-gradient(circle at 10% 90%, rgba(215,184,117,0.16), transparent 38%),
        linear-gradient(145deg, #713c4a, #4a2937);
    color: #fff4e7;
}

.last-section .little-kicker { color: #e9c994; }
.last-section .little-heading { color: #fff4e7; }

.last-section .dudu-gif {
    display: block;
    width: 220px;
    max-width: 75%;
    margin: 30px auto;
    padding: 10px;
    border: 1px solid rgba(240,211,180,0.4);
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 15px 35px rgba(30,10,20,0.25);
}

.last-message {
    max-width: 620px;
    margin: 25px auto 32px;
}

.last-message p {
    color: #f2dfd7;
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 17px;
}

.last-message .last-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 34px;
    color: #f5d8a6;
    margin-top: 25px;
}

.last-section .secondary-button {
    border-color: #e9c994;
    color: #f5d8a6;
}

.last-section .secondary-button:hover {
    background: #e9c994;
    color: #4a2937;
}

.little-footer {
    padding: 28px 20px;
    text-align: center;
    color: #9b6d70;
    background: linear-gradient(135deg, #efe2d6, #f8eee5);
    font-size: 10px;
    letter-spacing: 3px;
}

/* ANIMATIONS */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flameFlicker {
    from { transform: rotate(-5deg) scale(0.95); }
    to { transform: rotate(5deg) scale(1.08); }
}

@keyframes smokeRise {
    0% {
        opacity: 0.8;
        transform: translateY(0) translateX(0) scale(0.7);
    }
    100% {
        opacity: 0;
        transform: translateY(-45px) translateX(9px) scale(2);
    }
}

@keyframes confettiBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(0.5);
    }
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 700px) {
    .page-section { padding: 70px 18px; }

    .interest-grid { gap: 13px; }

    .interest-card {
        min-height: 190px;
        padding: 22px 12px;
    }

    .little-section {
        min-height: auto;
        padding: 78px 18px;
    }

    .memory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .memory-card {
        min-height: 220px;
        padding: 22px 15px;
    }

    .memory-card h3 { font-size: 18px; }
    .memory-card p { font-size: 12px; }

    .love-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flower-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 430px;
    }

    .flower-card:last-child {
        grid-column: 1 / -1;
        width: calc(50% - 8px);
        justify-self: center;
    }

    .little-description { font-size: 14px; }
    .dudu-gif { width: 190px; }

    .cake-scene {
        transform: scale(0.88);
        margin-top: 0;
        margin-bottom: 10px;
    }

    .cake-instruction { font-size: 24px; }
    .flower-wish-panel { font-size: 23px; }
    .letter-toggle { font-size: 16px; }
    .letter-paper p { font-size: 21px; }
}

@media (max-width: 600px) {
    .opening-screen {
        padding: 65px 18px 95px;
        background-position: center center;
    }

    .opening-overlay {
        background: linear-gradient(
            180deg,
            rgba(8,17,31,0.38),
            rgba(8,17,31,0.55) 50%,
            rgba(8,17,31,0.42)
        );
    }

    .top-note {
        top: 25px;
        font-size: 10px;
        letter-spacing: 2.5px;
    }

    .opening-content {
        padding: 24px 12px 20px;
        background: rgba(8,19,35,0.30);
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 3px;
        margin-bottom: 27px;
    }

    .opening-content h1 { font-size: clamp(52px, 13vw, 70px); }

    .birthday-date {
        font-size: 11px;
        letter-spacing: 3px;
    }

    .intro-text { font-size: 14px; }
    .envelope-area { margin-top: 35px; }
    .envelope-hint { font-size: 23px; }
    .open-button { font-size: 13px; }

    .bottom-note {
        margin-top: 20px;
        font-size: 9px;
        letter-spacing: 2px;
    }

    .script-heading { font-size: clamp(43px, 12vw, 60px); }
    .little-heading { font-size: clamp(42px, 11vw, 57px); }
    .dudu-gif { width: 190px; }

    .cake-scene {
        transform: scale(0.88);
        margin-top: 0;
        margin-bottom: 10px;
    }

    .cake-instruction { font-size: 24px; }

    .flower-wish-panel {
        padding: 22px 16px;
        font-size: 22px;
    }

    .letter-toggle { font-size: 15px; }

    .letter-paper { padding: 35px 23px; }
    .letter-paper p { font-size: 20px; }
    .last-message p { font-size: 14px; }

    /* Fixed backgrounds can behave poorly on mobile browsers. */
    .about-hero,
    .interests-section,
    .cake-section {
        background-attachment: scroll;
        background-position: center center;
    }
}

@media (max-width: 420px) {
    .memory-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
    }

    .memory-card { min-height: 185px; }

    .love-card-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
    }

    .love-card { min-height: 145px; }

    .flower-gallery { gap: 10px; }

    .flower-card { padding: 7px; }
    .flower-name { font-size: 12px; }
    .flower-tap { font-size: 9px; }

    .letter-item { padding: 17px; }
    .letter-toggle { font-size: 14px; }

    .reminder-note { padding: 28px 22px; }
    .reminder-note p { font-size: 23px; }
}

@media (max-width: 380px) {
    .opening-content h1 { font-size: 50px; }

    .envelope-area {
        transform: scale(0.9);
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .top-note {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .eyebrow {
        font-size: 10px;
        letter-spacing: 2.5px;
    }

    .interest-grid { grid-template-columns: 1fr; }
    .flower-gallery { gap: 8px; }
}
