/* ==========================================================================
   RSVP PAGE SPECIFIC STYLES
   Dual-card layout reflecting a physical luggage tag/reply card
   ========================================================================== */

/* 1. HERO SECTION */
.rsvp-hero {
    background: var(--color-dark, #1a1410); /* noir */
    min-height: 38vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 100px;
    text-align: center;
}

.rsvp-hero-label {
    font-size: 11px;
    letter-spacing: 0.55em;
    text-transform: uppercase;
    color: var(--color-light, #f2ede6);
    opacity: 0.3;
    animation: fadeUp 0.9s ease cubic-bezier(0.16,1,0.3,1) both;
    animation-delay: 0s;
    margin-bottom: 24px;
}

.rsvp-hero-title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(48px, 7vw, 80px);
    color: var(--color-light, #f2ede6);
    line-height: 1;
    margin-bottom: 24px;
    animation: fadeUp 0.9s ease cubic-bezier(0.16,1,0.3,1) both;
    animation-delay: 0.15s;
}

.rsvp-hero-rule {
    width: 56px;
    height: 1px;
    background-color: var(--color-light, #f2ede6);
    opacity: 0.2;
    margin: 0 auto 24px;
    transform-origin: center;
    animation: scaleXAnim 0.9s ease cubic-bezier(0.16,1,0.3,1) both;
    animation-delay: 0.28s;
}

.rsvp-hero-subline {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(14px, 1.4vw, 18px);
    letter-spacing: 0.06em;
    color: var(--color-light, #f2ede6);
    opacity: 0.5;
    animation: fadeUp 0.9s ease cubic-bezier(0.16,1,0.3,1) both;
    animation-delay: 0.4s;
    max-width: 400px;
    line-height: 1.6;
}

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

@keyframes scaleXAnim {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* 2. DECORATIVE STRIP */
.rsvp-strip {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-burgundy, #4a1528) 30%, var(--color-burgundy, #4a1528) 70%, transparent);
    opacity: 0.35;
}

/* 3. MAIN SECTION — THE CARD PAIR */
.rsvp-main {
    background-color: var(--color-light, #f2ede6); /* parchment */
    padding: 80px 40px 120px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
}

/* The cards wrap container */
.card-pair {
    display: flex;
    align-items: stretch;
    max-width: 860px;
    width: 100%;
    position: relative;
    /* Paper shadow */
    box-shadow: 0 8px 40px rgba(26,20,16,0.14), 0 2px 8px rgba(26,20,16,0.08);
    border-radius: 6px;
}

/* Vertical Perforation Line */
.card-pair::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 40px;
    bottom: 40px;
    width: 1px;
    background: repeating-linear-gradient(
        to bottom,
        rgba(74,21,40,0.25) 0px,
        rgba(74,21,40,0.25) 6px,
        transparent 6px,
        transparent 12px
    );
    z-index: 10;
    transform: translateX(-50%);
}

/* Base Card Style */
.rsvp-card {
    flex: 1;
    background-color: var(--color-light, #f2ede6);
    padding: 32px 28px 40px;
    display: flex;
    flex-direction: column;
    min-height: 580px;
    /* Very faint noise/grain texture overlay */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

.card-left {
    border: 1.5px solid rgba(74,21,40,0.3);
    border-right: none;
    border-radius: 6px 0 0 6px;
    align-items: center;
    text-align: center;
    position: relative;
}

.card-right {
    border: 1.5px solid rgba(74,21,40,0.3);
    border-left: none;
    border-radius: 0 6px 6px 0;
    align-items: stretch;
    position: relative;
    overflow: hidden; /* Contains the overlay for success msg */
}

/* Shared Elements */
.hole-punch {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(74,21,40,0.35);
    border-radius: 50%;
    margin: 0 auto 24px;
    flex-shrink: 0;
}

.thin-rule {
    width: 40px;
    height: 1px;
    background: rgba(74,21,40,0.3);
    margin: 0 auto 20px;
}

.full-rule {
    height: 1px;
    background: rgba(74,21,40,0.15);
    margin: 12px 0;
    width: 100%;
}

/* --- Left Card Content --- */
.couple-name {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.55em;
    text-transform: uppercase;
    color: var(--color-dark, #1a1410); /* espresso */
    margin-bottom: 16px;
}

.monogram-center {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(64px, 12vw, 96px);
    color: var(--color-burgundy, #4a1528);
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 4px;
}

.date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-line1 {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: 0.2em;
    color: var(--color-dark, #1a1410);
}

.date-line2 {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: 15px;
    letter-spacing: 0.15em;
    color: rgba(26,20,16,0.85);
    margin-top: 6px;
}

.card-spacer {
    flex-grow: 1;
}

.ref-box {
    border: 1px solid rgba(74,21,40,0.25);
    padding: 8px 14px;
    display: inline-block;
    margin-bottom: 16px;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(26,20,16,0.8);
}

.footer-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.05em;
    color: rgba(26,20,16,0.75);
    max-width: 180px;
    line-height: 1.7;
    margin: 0 auto;
}

/* --- Right Card Content --- */
.section-label-corner {
    position: absolute;
    top: 28px;
    right: 24px;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: rgba(26,20,16,0.7);
}

.form-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transition: opacity 0.4s ease;
}

.radio-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.radio-row {
    border: 1px solid rgba(74,21,40,0.25);
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1px;
    transition: background 0.2s ease, border-color 0.2s ease;
    background: transparent;
}

.radio-row input[type="radio"] {
    display: none;
}

.radio-row.selected {
    background: rgba(74,21,40,0.06);
}

.radio-row.error-highlight {
    border-color: rgba(180,30,30,0.4);
}

.radio-dot {
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(74,21,40,0.5);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.radio-row:active .radio-dot {
    transform: scale(1.1);
    background: rgba(74, 21, 40, 0.1);
}

.radio-row.selected .radio-dot {
    background: var(--color-burgundy, #4a1528);
    border-color: var(--color-burgundy, #4a1528);
}

.radio-label-text {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-dark, #1a1410);
    user-select: none;
    opacity: 0.85;
}

.date-display {
    text-align: center;
}

.date-display-month {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(40px, 7vw, 64px);
    letter-spacing: 0.04em;
    color: var(--color-burgundy, #4a1528);
    line-height: 1;
}

.date-display-year {
    font-family: var(--font-serif);
    font-size: 16px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(26,20,16,0.8);
    margin-top: 4px;
    font-weight: 400;
}

.form-label-center {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
    font-size: 15px;
    letter-spacing: 0.1em;
    color: rgba(26,20,16,0.9);
    text-align: center;
    margin-bottom: 16px;
}

.custom-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(74,21,40,0.25);
    background: transparent;
    font-family: var(--font-serif);
    font-size: 15px;
    font-style: italic;
    letter-spacing: 0.06em;
    color: var(--color-dark, #1a1410);
    padding: 8px 2px;
    outline: none;
    margin-bottom: 12px;
    transition: border-bottom-color 0.2s ease;
    border-radius: 0;
}

.custom-input::placeholder {
    color: rgba(26,20,16,0.65);
}

.custom-input:focus {
    border-bottom-color: rgba(74,21,40,0.7);
}

.custom-input.error-border {
    border-bottom-color: rgba(180,30,30,0.6);
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.custom-select-wrapper::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url('data:image/svg+xml;utf8,%3Csvg fill="none" stroke="rgba(26,20,16,0.5)" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"%3E%3C/path%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(74,21,40,0.25);
    background: transparent;
    font-family: var(--font-serif);
    font-size: 15px;
    font-style: italic;
    letter-spacing: 0.06em;
    color: var(--color-dark, #1a1410);
    padding: 8px 24px 8px 2px;
    outline: none;
    cursor: pointer;
    border-radius: 0;
}

.custom-select:focus {
    border-bottom-color: rgba(74,21,40,0.7);
}

textarea.custom-input {
    resize: none;
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-submit {
    width: 100%;
    background: var(--color-burgundy, #4a1528);
    color: var(--color-light, #f2ede6);
    border: none;
    border-radius: 0;
    padding: 14px 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, opacity 0.25s ease, color 0.25s ease;
    margin-top: 4px;
}

.btn-submit:hover:not(:disabled) {
    background: #3D1020;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit.success {
    background: rgba(92,91,53,0.12);
    color: #5C5B35;
}

.btn-submit.error {
    background: rgba(74,21,40,0.15);
    color: var(--color-dark, #1a1410);
}

.fine-print {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.15em;
    font-style: italic;
    color: rgba(26,20,16,0.65);
    text-align: center;
    margin-top: 10px;
}

/* ERROR MESSAGES & ANIMATIONS */
.error-msg {
    display: block;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 10px;
    color: rgba(180,30,30,0.7);
    margin-top: -6px;
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    height: 0;
    overflow: hidden;
    text-align: left;
}

.error-msg.visible {
    opacity: 1;
    height: auto;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.4s ease;
}

/* CONDITIONAL GROUPS (Dietary / Allergy slide up) */
.conditional-group {
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
}

.conditional-group.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

/* SUCCESS STATE OVERLAY */
.success-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 32px 28px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 5;
}

.show-success .form-content {
    opacity: 0;
    pointer-events: none;
}

.show-success .success-content {
    opacity: 1;
    pointer-events: auto;
}

.success-content .hole-punch {
    position: absolute;
    top: 32px;
}

.success-content .thin-rule-top {
    position: absolute;
    top: 80px;
}

.success-checkmark {
    width: 48px;
    height: 48px;
    border: 2px solid #5C5B35;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.success-checkmark::after {
    content: '';
    width: 14px;
    height: 24px;
    border-bottom: 2px solid #5C5B35;
    border-right: 2px solid #5C5B35;
    transform: rotate(45deg) translate(-2px, -4px);
}

.success-heading {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(28px, 4vw, 40px);
    color: #5C5B35;
    margin-bottom: 16px;
    line-height: 1;
}

.success-body {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.9;
    color: var(--color-dark, #1a1410);
    max-width: 280px;
}

.success-date {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(22px, 3vw, 32px);
    color: var(--color-burgundy, #4a1528);
    margin-top: 16px;
}

/* RESPONSIVE STACK FOR MOBILE */
@media (max-width: 768px) {
    .rsvp-main {
        padding: 60px 20px 80px;
    }
    
    .card-pair {
        flex-direction: column;
        align-items: center;
        max-width: 420px;
    }

    .card-pair::after {
        display: none; /* remove perforation line */
    }

    .card-left {
        border-right: 1.5px solid rgba(74,21,40,0.3);
        border-bottom: none;
        border-radius: 6px 6px 0 0;
        width: 100%;
        min-height: auto;
        padding-bottom: 32px;
    }

    /* Collapse the left card on mobile strictly to title/monogram */
    .card-left .date-block,
    .card-left .footer-text {
        display: none;
    }

    /* iOS Auto-Zoom Fix for Inputs */
    .custom-input,
    .custom-select {
        font-size: 16px;
    }

    /* Increase radio row touch target */
    .radio-row {
        padding: 14px 16px;
    }

    .card-right {
        border-left: 1.5px solid rgba(74,21,40,0.3);
        border-top: none;
        border-radius: 0 0 6px 6px;
        width: 100%;
        min-height: 580px;
        
        /* Simulate horizontal perforation line */
        background-image: 
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E"),
            repeating-linear-gradient(to right, rgba(74,21,40,0.25) 0px, rgba(74,21,40,0.25) 6px, transparent 6px, transparent 12px);
        background-size: auto, 100% 1px;
        background-repeat: repeat, no-repeat;
        background-position: top left, top left;
    }

    .section-label-corner {
        top: 16px;
        right: 16px;
        z-index: 10;
    }
}

/* ==========================================================================
   ADULTS ONLY SEAL STYLER
   ========================================================================== */
.rsvp-adults-seal {
    position: absolute;
    top: -24px;
    right: 20px;
    width: 80px;
    height: 80px;
    background-color: var(--color-burgundy, #4a1528);
    border-radius: 50%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(242, 237, 230, 0.15);
    pointer-events: none;
    /* Gentle floating animation on mobile */
    animation: sealFloat 4s ease-in-out infinite, sealSpin 30s linear infinite;
    transform-origin: center center;
}

.seal-svg {
    width: 85%;
    height: 85%;
}

.seal-text {
    font-family: var(--font-serif);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    fill: var(--color-light, #f2ede6);
}

.seal-dot {
    fill: var(--color-light, #f2ede6);
    opacity: 0.8;
}

@keyframes sealSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes sealFloat {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -8px; }
}

/* --- Responsive Adjustments for Seal --- */
@media (min-width: 769px) {
    .rsvp-adults-seal {
        top: 60px;
        left: 50%;
        right: auto;
        /* Center it over the perforation on desktop */
        transform: translateX(-50%);
        width: 100px;
        height: 100px;
        animation: sealSpinDesktop 40s linear infinite;
    }

    @keyframes sealSpinDesktop {
        0% { transform: translateX(-50%) rotate(0deg); }
        100% { transform: translateX(-50%) rotate(360deg); }
    }
}

@media (max-width: 480px) {
    .rsvp-adults-seal {
        width: 72px;
        height: 72px;
        top: -20px;
        right: 15px;
    }
    .seal-text {
        font-size: 10.5px;
    }
}

