@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Great+Vibes&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    --burgundy: #743C5A;
    --pink: #CE4F7F;
    --light-pink: #FFC2CD;
    --sky: #BAC8F4;
    --navy: #253668;
    --navy-dark: #1b2850;
    --navy-light: #2f4585;
    --cream: #FDF8F5;
    --ivory: #FCF6F0;
    --paper: #FAF5EF;
    --gold: #C4A882;
    --font-serif: 'Cormorant Garamond', serif;
    --font-script: 'Great Vibes', cursive;
    --font-sans: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: #2a2a2a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#envelope-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at 50% 100%, #2f4585 0%, #1b2850 70%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

#envelope-intro.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope-wrapper {
    position: relative;
    width: 92%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1500px;
}

.envelope-text-top {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-serif);
    font-weight: 300;
    letter-spacing: 4px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.envelope-text-top .ornament-line {
    display: block;
    font-size: 1.2rem;
    color: var(--light-pink);
    margin-bottom: 12px;
    letter-spacing: 8px;
}

.envelope-text-top .invitation-label {
    font-weight: 500;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
}

.envelope-container {
    width: 100%;
    aspect-ratio: 4/3;
    position: relative;
    margin: 10px 0;
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    isolation: isolate;
}

.envelope-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #2f4585, #1b2850);
    border-radius: 3px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.envelope-preview {
    position: absolute;
    bottom: 2%;
    left: 5%;
    width: 90%;
    height: 92%;
    background: linear-gradient(180deg, #faf5ef 0%, #f5ece3 100%);
    border-radius: 3px 3px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    z-index: 20;
    transform: translate3d(0, 30%, 0) scale(0.9);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
    box-shadow: inset 0 -20px 40px rgba(0, 0, 0, 0.05);
}

.preview-ornament {
    font-size: 2.5rem;
    color: var(--burgundy);
    opacity: 0.2;
    font-family: var(--font-serif);
    margin-bottom: 5px;
}

.preview-xv {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--burgundy);
    letter-spacing: 10px;
    line-height: 1;
}

.preview-name {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--navy);
    margin-top: -8px;
}

.preview-line {
    width: 60px;
    height: 1px;
    background: var(--gold);
    opacity: 0.3;
    margin: 8px 0;
}

.preview-sub {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    color: var(--navy);
    opacity: 0.5;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.envelope-flap {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #2f4585 0%, #1b2850 100%);
    clip-path: polygon(0 0, 100% 0, 50% 65%);
    z-index: 3;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transform-origin: top;
}

.envelope-bottom {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #1b2850, #162240);
    clip-path: polygon(0 100%, 50% 55%, 100% 100%);
    z-index: 2;
}

.envelope-left {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2f4585, #1b2850);
    clip-path: polygon(0 0, 50% 50%, 0 100%);
    z-index: 3;
    filter: drop-shadow(2px 0 4px rgba(0, 0, 0, 0.2));
}

.envelope-right {
    position: absolute;
    inset: 0;
    background: linear-gradient(225deg, #2f4585, #1b2850);
    clip-path: polygon(100% 0, 100% 100%, 50% 50%);
    z-index: 3;
    filter: drop-shadow(-2px 0 4px rgba(0, 0, 0, 0.2));
}

.envelope-top {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #354b8a, #1b2850);
    clip-path: polygon(0 0, 100% 0, 50% 60%);
    z-index: 4;
    transform-origin: top;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.wax-seal-container {
    position: absolute;
    top: 56%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.wax-seal-container:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.wax-seal {
    width: 72px;
    height: 72px;
    background: radial-gradient(circle at 35% 30%, #9c547b, #743C5A 65%, #4a2538);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 2px 8px rgba(255, 255, 255, 0.25);
    border: 2px solid #5a2c44;
    position: relative;
}

.wax-seal::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seal-inner {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #8a4a6a, #5a2c44);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seal-initials {
    font-family: var(--font-script);
    color: var(--light-pink);
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.envelope-wrapper.is-opening .wax-seal-container {
    animation: breakSeal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.envelope-wrapper.is-opening .envelope-top {
    transform: rotateX(180deg);
    z-index: 4;
}

.envelope-wrapper.is-opening .envelope-flap {
    transform: rotateX(180deg);
    z-index: 3;
}

.envelope-wrapper.is-opening .envelope-preview {
    opacity: 1;
    transform: translate3d(0, -58%, 0) scale(1);
    z-index: 20;
}

@keyframes breakSeal {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0); }
    25% { transform: translate(-50%, -50%) scale(1.15) rotate(8deg); }
    50% { transform: translate(-50%, -50%) scale(0.9) rotate(-6deg); }
    75% { transform: translate(-50%, -50%) scale(1.05) rotate(3deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.4) rotate(0); opacity: 0; pointer-events: none; }
}

.envelope-text-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-serif);
    font-weight: 300;
    letter-spacing: 3px;
    font-size: 0.8rem;
    margin-top: 20px;
}

#invitation {
    display: block;
    background: var(--paper);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
}

#invitation.active {
    display: block;
    animation: revealInvitation 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes revealInvitation {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.watercolor-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.watercolor-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 15% 10%, var(--light-pink) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 20%, var(--sky) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 80%, var(--pink) 0%, transparent 35%),
        radial-gradient(ellipse at 90% 85%, var(--burgundy) 0%, transparent 30%),
        radial-gradient(ellipse at 50% 50%, var(--navy) 0%, transparent 25%);
    filter: blur(80px);
}

.watercolor-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, var(--light-pink) 0%, transparent 20%),
        radial-gradient(circle at 70% 60%, var(--sky) 0%, transparent 20%);
    filter: blur(40px);
    opacity: 0.4;
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--navy);
    font-size: 0.95rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.card-title {
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--navy);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.card-subtitle {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--burgundy);
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.card-text {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #4a4a4a;
}

.cursive-title {
    font-family: var(--font-script);
    font-size: 2.6rem;
    color: var(--burgundy);
    font-weight: 400;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.4s ease;
}

.section-cake:hover .cursive-title {
    transform: scale(1.02);
    color: var(--navy);
}

.divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

.divider-ornament .line {
    height: 1px;
    width: 30px;
    background: var(--gold);
    opacity: 0.4;
}

.divider-ornament .line.light {
    background: rgba(255, 255, 255, 0.3);
}

.divider-ornament .diamond {
    color: var(--burgundy);
    font-size: 0.5rem;
    opacity: 0.5;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.4s ease;
}

section:hover .divider-ornament .diamond {
    transform: rotate(180deg) scale(1.2);
    color: var(--navy);
}

.divider-ornament.small .diamond {
    font-size: 0.4rem;
}

.section-hero {
    min-height: 90vh;
    padding: 60px 30px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-hero.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.05s;
}

.hero-floral {
    position: absolute;
    opacity: 0.12;
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--burgundy);
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

.section-hero:hover .hero-floral.top-left {
    transform: rotate(-20deg) scale(1.1);
    opacity: 0.15;
}

.section-hero:hover .hero-floral.top-right {
    transform: rotate(20deg) scale(1.1);
    opacity: 0.15;
}

.section-hero:hover .hero-floral.bottom-left {
    transform: rotate(-15deg) scale(1.1);
}

.section-hero:hover .hero-floral.bottom-right {
    transform: rotate(15deg) scale(1.1);
}

.hero-floral.top-left {
    top: 20px;
    left: 10px;
    transform: rotate(-15deg);
}

.hero-floral.top-right {
    top: 20px;
    right: 10px;
    transform: rotate(15deg);
}

.hero-floral.bottom-left {
    bottom: 30px;
    left: 5px;
    transform: rotate(-10deg);
    font-size: 3rem;
}

.hero-floral.bottom-right {
    bottom: 30px;
    right: 5px;
    transform: rotate(10deg);
    font-size: 3rem;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.ornament-top {
    font-size: 1.8rem;
    color: var(--burgundy);
    opacity: 0.2;
    font-family: var(--font-serif);
    margin-bottom: 8px;
}

.subtitle {
    font-family: var(--font-serif);
    font-weight: 300;
    color: var(--navy);
    font-size: 1.1rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin: 5px 0;
}

.name-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0 15px;
}

.name-first {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 4.2rem;
    color: var(--burgundy);
    line-height: 1;
    letter-spacing: 2px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.4s ease;
}

.section-hero:hover .name-first {
    transform: scale(1.02);
    color: var(--navy);
}

.name-last {
    font-family: var(--font-script);
    font-size: 3.8rem;
    color: var(--navy);
    margin-top: -8px;
    font-weight: 400;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.4s ease;
}

.section-hero:hover .name-last {
    transform: scale(1.02);
    color: var(--burgundy);
}

.hero-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
    color: #4a4a4a;
    max-width: 320px;
    margin: 10px auto 0;
    font-style: italic;
}

.section-countdown {
    padding: 50px 30px 45px;
    text-align: center;
    background: linear-gradient(180deg, var(--paper), #fff);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-countdown.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.countdown-ornament {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--burgundy);
    opacity: 0.15;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    margin: 25px 0 15px;
    color: var(--navy);
    position: relative;
    z-index: 1;
}

.countdown-container .number {
    transition: color 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.countdown-container:hover .number {
    color: var(--navy);
    transform: scale(1.02);
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.time-box .number {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--burgundy);
    letter-spacing: 2px;
}

.time-box .label {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.55rem;
    letter-spacing: 2px;
    color: var(--navy);
    opacity: 0.6;
    margin-top: 6px;
}

.colon {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 2rem;
    color: var(--burgundy);
    opacity: 0.3;
    padding-top: 5px;
}

.event-date {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--navy);
    font-size: 0.85rem;
    letter-spacing: 4px;
    margin-top: 15px;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.section-cake {
    padding: 45px 30px 50px;
    text-align: center;
    background: linear-gradient(180deg, #fff, var(--paper));
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-cake.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.cake-floral {
    position: absolute;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--burgundy);
    opacity: 0.08;
}

.cake-floral.left {
    left: 5px;
    top: 20%;
    transform: rotate(-20deg);
}

.cake-floral.right {
    right: 5px;
    bottom: 20%;
    transform: rotate(20deg);
}

.cake-frame {
    width: 80%;
    max-width: 280px;
    margin: 20px auto;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(116, 60, 90, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

.cake-placeholder {
    aspect-ratio: 4/5;
    background: #f5ece3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
    position: relative;
    overflow: hidden;
}

.cake-placeholder::before {
    display: none;
}

.cake-placeholder::after {
    display: none;
}

.cake-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 1px;
}

.cake-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 0.95rem;
    color: #4a4a4a;
    line-height: 1.7;
    font-style: italic;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.section-details {
    padding: 45px 30px 50px;
    background: var(--paper);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-details.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.details-card {
    border: 1px solid rgba(116, 60, 90, 0.08);
    padding: 35px 25px 30px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.02);
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(5px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.details-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.06);
}

.details-list {
    list-style: none;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    text-align: left;
}

.details-list li {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.details-list li:hover .detail-icon {
    transform: scale(1.1);
    background: var(--burgundy);
}

.detail-icon.calendar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

.detail-icon.calendar::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 10px;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.detail-icon.clock::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

.detail-icon.clock::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    transform: translateX(-50%) rotate(0deg);
}

.detail-icon.location::before {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--navy);
    opacity: 0.5;
    text-transform: uppercase;
}

.detail-value {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--navy);
    line-height: 1.4;
}

.section-dresscode {
    padding: 40px 30px 45px;
    background: linear-gradient(180deg, var(--paper), rgba(255, 194, 205, 0.05));
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-dresscode.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s;
}

.dresscode-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(116, 60, 90, 0.06);
    padding: 35px 25px 30px;
    text-align: center;
    border-radius: 2px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(5px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.dresscode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.06);
}

.card-ornament {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--burgundy);
    opacity: 0.15;
    margin-bottom: 5px;
}

.section-color {
    padding: 40px 30px 45px;
    background: rgba(186, 200, 244, 0.05);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-color.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.color-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(116, 60, 90, 0.06);
    padding: 35px 25px 30px;
    text-align: center;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(5px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.color-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.06);
}

.color-floral {
    position: absolute;
    top: -20px;
    right: -20px;
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--sky);
    opacity: 0.08;
    transform: rotate(20deg);
}

.color-swatch {
    margin: 25px auto 20px;
    width: 160px;
    height: 80px;
    position: relative;
}

.brush-svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: rotate(-4deg);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

.color-card:hover .brush-svg {
    transform: rotate(-2deg) scale(1.05);
    filter: drop-shadow(0 8px 25px rgba(37, 54, 104, 0.15));
}

.color-name {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--navy);
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin: 10px 0 5px;
}

.color-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 0.9rem;
    color: #4a4a4a;
    line-height: 1.6;
    font-style: italic;
}

.section-gift {
    padding: 40px 30px 45px;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 194, 205, 0.06) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-gift.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.35s;
}

.gift-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(116, 60, 90, 0.06);
    padding: 35px 25px 30px;
    text-align: center;
    border-radius: 2px;
    position: relative;
    backdrop-filter: blur(5px);
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gift-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.06);
}

.gift-floral {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--light-pink);
    opacity: 0.1;
    transform: rotate(-10deg);
}

.section-rsvp {
    padding: 45px 30px 50px;
    background: linear-gradient(180deg, var(--paper), rgba(186, 200, 244, 0.05));
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-rsvp.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.rsvp-floral {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--sky);
    opacity: 0.06;
    transform: rotate(15deg);
}

.rsvp-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 1rem;
    color: #4a4a4a;
    line-height: 1.8;
    margin: 15px 0 25px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 320px;
    margin: 20px auto;
    position: relative;
    z-index: 1;
}

.form-group {
    width: 100%;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(116, 60, 90, 0.15);
    border-radius: 2px;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    outline: none;
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--burgundy);
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--burgundy);
    box-shadow: 0 0 0 4px rgba(116, 60, 90, 0.08);
    background: #fff;
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group select::placeholder {
    color: var(--navy);
    opacity: 0.4;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23743C5A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.rsvp-note {
    margin-top: 25px;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--navy);
    opacity: 0.6;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.rsvp-note::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 20px;
    background: radial-gradient(ellipse at 50% 50%, rgba(186, 200, 244, 0.05), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.rsvp-note:hover::before {
    opacity: 1;
}

.btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 32px;
    border: none;
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 2px;
    position: relative;
    text-align: center;
    line-height: 1.4;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    transform: translateY(0);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn:hover::before {
    transform: scaleX(1);
}

.btn:active {
    transform: scale(0.95) !important;
}

.btn-navy {
    background: var(--navy);
    color: #fff;
    padding: 14px 40px;
    font-weight: 300;
    box-shadow: 0 4px 20px rgba(37, 54, 104, 0.15);
}

.btn-navy:hover {
    background: var(--navy-dark);
    box-shadow: 0 6px 30px rgba(37, 54, 104, 0.25);
    transform: translateY(-2px);
}

.btn-burgundy {
    background: linear-gradient(135deg, var(--burgundy), #8a4a6a);
    color: #fff;
    padding: 18px 36px;
    box-shadow: 0 4px 25px rgba(116, 60, 90, 0.2);
}

.btn-burgundy:hover {
    box-shadow: 0 6px 35px rgba(116, 60, 90, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.btn-icon {
    font-size: 0.7rem;
    opacity: 0.5;
    letter-spacing: 4px;
}

.btn-sub {
    font-weight: 300;
    font-size: 0.7rem;
    opacity: 0.7;
    letter-spacing: 3px;
}

.section-footer {
    background: linear-gradient(180deg, var(--navy-dark), var(--navy));
    color: #fff;
    padding: 60px 30px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-footer.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.45s;
}

.footer-floral {
    position: absolute;
    top: -40px;
    left: -40px;
    font-family: var(--font-serif);
    font-size: 8rem;
    color: var(--burgundy);
    opacity: 0.06;
    transform: rotate(-20deg);
}

.footer-title {
    font-family: var(--font-script);
    font-size: 4.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), text-shadow 0.4s ease;
}

.section-footer:hover .footer-title {
    transform: scale(1.02);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
}

.footer-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 0.95rem;
    letter-spacing: 3px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.7);
    margin: 15px 0;
    position: relative;
    z-index: 1;
}

.footer-ornament {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--light-pink);
    opacity: 0.15;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

section:hover .watercolor-bg {
    transform: scale(1.02);
}

@media (max-width: 430px) {
    .name-first {
        font-size: 3.6rem;
    }
    
    .name-last {
        font-size: 3.2rem;
    }
    
    .time-box .number {
        font-size: 2.4rem;
    }
    
    .time-box {
        min-width: 40px;
    }
    
    .colon {
        font-size: 1.6rem;
    }
    
    .cursive-title {
        font-size: 2.2rem;
    }
    
    .wax-seal {
        width: 60px;
        height: 60px;
    }
    
    .seal-inner {
        width: 44px;
        height: 44px;
    }
    
    .seal-initials {
        font-size: 1.6rem;
    }

    .rsvp-form {
        max-width: 100%;
    }

    .preview-xv {
        font-size: 3.5rem;
    }

    .preview-name {
        font-size: 1.8rem;
    }

    .color-swatch {
        width: 130px;
        height: 65px;
    }

    .section-hero,
    .section-countdown,
    .section-cake,
    .section-details,
    .section-dresscode,
    .section-color,
    .section-gift,
    .section-rsvp,
    .section-footer {
        transform: translateY(40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .section-hero.visible,
    .section-countdown.visible,
    .section-cake.visible,
    .section-details.visible,
    .section-dresscode.visible,
    .section-color.visible,
    .section-gift.visible,
    .section-rsvp.visible,
    .section-footer.visible {
        transform: translateY(0);
    }
}

@media (min-width: 481px) {
    #invitation {
        margin: 40px auto;
        border-radius: 4px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }
    
    #envelope-intro {
        background: rgba(27, 40, 80, 0.95);
    }
}
/* --- Preinvitación de Emily: formulario de disponibilidad --- */
[hidden] { display: none !important; }
#invitation { color: #2a2a2a; }
.name-first { font-size: clamp(2.6rem, 11vw, 4.2rem); }
.name-last { font-size: clamp(2.25rem, 9vw, 3.8rem); line-height: 1.15; }
.section-details, .section-rsvp, .section-footer { position: relative; }
.section-details, .section-rsvp, .section-footer { opacity: 1; transform: none; }
.section-details.visible, .section-rsvp.visible, .section-footer.visible { opacity: 1; transform: none; }
.details-list { max-width: 320px; margin-left: auto; margin-right: auto; }
.rsvp-text { position: relative; z-index: 1; max-width: 340px; margin: 14px auto 24px; font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.75; color: #4a4a4a; }
.rsvp-form { position: relative; z-index: 2; width: 100%; max-width: 360px; margin: 0 auto; text-align: left; }
.form-group { margin-bottom: 20px; }
.form-label, .availability-options legend { display: block; margin-bottom: 9px; font-family: var(--font-serif); color: var(--navy); font-size: 1.05rem; }
#guest-name { width: 100%; min-height: 48px; padding: 13px 14px; border: 1px solid rgba(37,54,104,.22); border-radius: 4px; background: rgba(255,255,255,.82); color: #2a2a2a; font: 400 .9rem var(--font-sans); outline-offset: 3px; }
#guest-name:focus { border-color: var(--burgundy); }
.availability-options { border: 0; margin: 0 0 22px; padding: 0; }
.availability-options legend { margin-bottom: 12px; line-height: 1.5; }
.availability-option { display: flex; align-items: center; gap: 11px; min-height: 52px; margin: 9px 0; padding: 12px 14px; border: 1px solid rgba(116,60,90,.18); border-radius: 5px; background: rgba(255,255,255,.72); font: 400 .85rem var(--font-sans); color: #3d3d3d; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.availability-option:has(input:checked) { border-color: var(--burgundy); background: rgba(255,194,205,.2); }
.availability-option input { width: 18px; height: 18px; accent-color: var(--burgundy); flex-shrink: 0; }
.option-mark { color: var(--burgundy); font-size: 1.2rem; }
.rsvp-form .btn { width: 100%; justify-content: center; min-height: 50px; border: 0; cursor: pointer; }
.form-help { margin: 15px 5px 0; text-align: center; font: 300 .75rem/1.7 var(--font-sans); color: #666; }
.thank-you { position: relative; z-index: 2; max-width: 340px; margin: 25px auto 0; padding: 28px 20px; border: 1px solid rgba(116,60,90,.2); background: rgba(255,255,255,.76); text-align: center; animation: revealInvitation .6s ease both; }
.thank-you-ornament { color: var(--burgundy); font-size: 1.8rem; margin-bottom: 10px; }
.thank-you h3 { color: var(--burgundy); font: 400 2rem/1.2 var(--font-script); }
.thank-you p { margin-top: 12px; color: #4a4a4a; font: 300 .85rem/1.7 var(--font-sans); }
@media (max-width: 380px) { .section-hero { padding-left: 20px; padding-right: 20px; } .details-card { padding-left: 18px; padding-right: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
