* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Georgia, 'Times New Roman', serif;
    background: radial-gradient(circle at top, #fffefd 0, var(--page-bg) 52%, #f6e5df 100%);
    color: #3a2a25;
    overflow-x: hidden;
}

.background-orbs::before,
.background-orbs::after {
    content: '';
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(201, 130, 139, 0.16);
    filter: blur(28px);
    z-index: 0;
    animation: floatSoft 9s ease-in-out infinite alternate;
}

.background-orbs::before {
    top: 6%;
    left: -100px;
}

.background-orbs::after {
    bottom: 4%;
    right: -120px;
    background: rgba(182, 139, 98, 0.14);
    animation-delay: 1.2s;
}

.public-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 46px;
}

.invitation-card,
.event-card {
    position: relative;
    background: rgba(255, 250, 247, 0.92);
    border: 1px solid rgba(234, 212, 202, 0.96);
    border-radius: 34px;
    box-shadow: 0 22px 60px rgba(85, 45, 38, 0.12);
    backdrop-filter: blur(10px);
}

.hero-card {
    max-width: 720px;
    margin: 0 auto 26px;
    padding: 46px 34px 42px;
    text-align: center;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(182, 139, 98, 0.28);
    border-radius: 26px;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 140px;
    height: 140px;
    opacity: 0.38;
    background: radial-gradient(circle, rgba(201, 130, 139, 0.22), transparent 58%);
}

.corner-left {
    top: 12px;
    left: 12px;
}

.corner-right {
    right: 12px;
    bottom: 12px;
}

.wax-seal {
    width: 82px;
    height: 82px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 25%, #e9b7bd, var(--primary));
    color: white;
    font-size: 18px;
    letter-spacing: 1px;
    box-shadow: 0 14px 28px rgba(140, 72, 83, 0.22), inset 0 2px 8px rgba(255, 255, 255, 0.24);
    animation: sealPulse 4s ease-in-out infinite;
}

.arabic {
    margin: 0 0 18px;
    color: var(--gold);
    font-size: clamp(22px, 4vw, 32px);
    line-height: 1.8;
}

.overline,
.event-overline {
    margin: 0 0 14px;
    color: #85685e;
    text-transform: uppercase;
    letter-spacing: 2.4px;
    font-size: 12px;
}

.guest-name {
    font-size: 19px;
    margin: 10px 0;
    color: #6e4c45;
}

h1 {
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    margin: 20px 0;
    color: var(--primary);
    letter-spacing: 4px;
    font-weight: 700;
}

h2 {
    color: var(--primary);
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 14px;
}

p {
    line-height: 1.7;
}

.fine-text {
    max-width: 500px;
    margin: 0 auto;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.event-card {
    padding: 28px;
    overflow: hidden;
}

.event-card::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(201, 130, 139, 0.08);
    right: -48px;
    top: -42px;
}

.event-details {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.event-details div {
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff3ef;
}

.event-details strong,
.event-details span {
    display: block;
}

.event-details strong {
    color: #85685e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin-bottom: 5px;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.countdown div {
    padding: 12px 6px;
    border-radius: 16px;
    text-align: center;
    background: #fff7f4;
    border: 1px solid #efd8d0;
}

.countdown strong {
    display: block;
    color: #8d5961;
    font-size: 24px;
}

.countdown span {
    display: block;
    color: #7c655c;
    font-size: 11px;
    text-transform: uppercase;
}

.button-row {
    display: flex;
    gap: 10px;
}

.public-btn,
.rsvp-form button {
    border: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 20px rgba(201, 130, 139, 0.18);
}

.public-btn:hover,
.rsvp-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 24px rgba(201, 130, 139, 0.25);
}

.public-btn-alt {
    background: var(--gold);
}

.rsvp-card {
    max-width: 760px;
    margin: 24px auto 0;
    padding: 32px;
}

.rsvp-form {
    display: grid;
    gap: 12px;
}

.rsvp-form label {
    color: #6d5048;
    font-weight: 700;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    border: 1px solid #ead4ca;
    border-radius: 16px;
    padding: 14px 16px;
    font: inherit;
    background: #fffaf7;
}

.checkbox-list {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #fff3ef;
    border-radius: 16px;
}

.checkbox-list label {
    font-weight: 400;
}

.public-notice {
    padding: 14px 16px;
    border-radius: 16px;
    margin: 14px 0;
}

.public-notice.success {
    background: #eef8ef;
    color: #315a36;
}

.public-notice.error {
    background: #fff0f0;
    color: #7b2a2a;
}

.error-card {
    max-width: 560px;
    padding: 48px 32px;
    text-align: center;
    margin: 14vh auto 0;
}

.public-footer {
    text-align: center;
    padding: 28px 10px 0;
    color: #7c655c;
}

.animate-in {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    animation: cardIn 720ms ease forwards;
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sealPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.035);
    }
}

@keyframes floatSoft {
    to {
        transform: translate(18px, 22px);
    }
}

@media (max-width: 980px) {
    .public-shell {
        width: min(760px, calc(100% - 28px));
    }

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

    .hero-card {
        min-height: 480px;
    }
}

@media (max-width: 640px) {
    .public-shell {
        width: calc(100% - 20px);
        padding-top: 14px;
    }

    .hero-card,
    .event-card,
    .rsvp-card {
        border-radius: 26px;
        padding: 26px 18px;
    }

    .hero-card {
        min-height: auto;
    }

    .wax-seal {
        width: 70px;
        height: 70px;
        font-size: 15px;
    }

    .button-row {
        flex-direction: column;
    }

    .countdown {
        grid-template-columns: repeat(2, 1fr);
    }
}
