/* ==========================================
   1. SECTION ARCHITECTURE
   ========================================== */
.luxicasa-invite {
    position: relative;
    width: 100%;
    padding: clamp(100px, 12vw, 160px) 0; 
    background-color: #ffffff; /* Flows perfectly into the black footer */
    border-top: 1px solid rgba(0, 0, 0, 0.05); 
}

.invite-container {
    max-width: var(--container-width, 1440px);
    margin: 0 auto;
    padding: 0 var(--container-padding, 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ==========================================
   2. EDITORIAL TYPOGRAPHY
   ========================================== */
.invite-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.invite-headline {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 6vw, 5.5rem); 
    font-weight: 400;
    color: #1a1a1a;
    margin: 0 auto var(--space-md, 20px) auto;
    letter-spacing: -0.03em;
    line-height: 1;
}

.invite-subline {
    font-family: var(--font-sans);
    font-size: var(--text-base, 1rem);
    color: rgba(0,0,0,0.6);
    line-height: 1.8;
    font-weight: 400;
    /* The Magic Fix: Auto margins force the 500px box into the exact dead-center */
    margin: 0 auto var(--space-3xl, 80px) auto; 
    max-width: 500px;
    text-align: center;
}

/* ==========================================
   3. FORM ARCHITECTURE
   ========================================== */
.invite-form-wrapper {
    width: 100%;
    max-width: 600px; 
}

.invite-form {
    width: 100%;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center; 
    border-bottom: 1px solid rgba(0,0,0,0.2);
    transition: border-color 0.4s ease;
}

.input-group:focus-within {
    border-bottom-color: #000000;
}

.invite-input {
    flex: 1; 
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    font-family: var(--font-sans);
    font-size: var(--text-lg, 1.125rem);
    color: #1a1a1a;
    outline: none;
}

.invite-input::placeholder {
    color: rgba(0,0,0,0.3);
    font-weight: 400; /* Adjusted from 300 for slightly better readability */
}

/* --- THE "LINE" BUTTON --- */
.invite-submit {
    background: transparent;
    border: none;
    padding: 20px 0 20px 20px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
    outline: none;
}

.btn-line {
    width: 30px;
    height: 1px;
    background-color: #1a1a1a;
    display: block;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.invite-submit:hover .btn-line {
    width: 60px; /* Elegant elongation */
}

/* ==========================================
   4. FEEDBACK MESSAGES
   ========================================== */
.invite-success, 
.invite-error {
    margin-top: 25px;
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    animation: fadeIn 0.6s ease;
}

.invite-success { color: #2e7d32; }
.invite-error { color: #d32f2f; }

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

/* ==========================================
   5. RESPONSIVE QUERIES
   ========================================== */
@media (max-width: 768px) {
    .luxicasa-invite { padding: 80px 0; }
    
    .input-group { 
        flex-direction: column; 
        align-items: stretch; 
        border-bottom: none;
    }
    
    .invite-input {
        border-bottom: 1px solid rgba(0,0,0,0.2);
        margin-bottom: var(--space-md, 20px);
    }
    
    .invite-submit { 
        justify-content: center; 
        background: #000000;
        color: #ffffff;
        padding: 20px 0; 
        margin-top: 10px;
    }
    
    .invite-submit .btn-line { 
        display: none; 
    }
}