/* --- 1. Global Variables --- */
:root {
    --color-black: #0a0a0a;
    --color-white: #ffffff;
    --color-gold: #D4AF37;
    --color-light-gold: #FFD700;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
}

/* --- 2. Base/Reset Styles --- */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-black);
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), 
        url('newsletter_background.png'); 
    background-size: cover; 
    background-position: center center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    
    font-family: var(--font-body);
    color: var(--color-white); 
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    body {
        background-attachment: fixed;
    }
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-white); 
    margin-top: 0;
}

h1 { font-size: 3.5em; }
h2 { font-size: 2.5em; }
h3 { font-size: 1.8em; }

p {
    font-size: 1.1em;
    line-height: 1.8;
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-light-gold);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- 3. Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 { animation-delay: 0.2s; }
.fade-in-up.delay-2 { animation-delay: 0.4s; }
.fade-in-up.delay-3 { animation-delay: 0.6s; }

.error-shake {
    animation: shake 0.4s ease-in-out;
}

/* --- 4. Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

.hero-text-container {
    width: 100%;
}

.headline {
    font-size: 3em;
    margin-bottom: 5px; 
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
    hyphens: auto;
}

.headline.delay-1 {
    padding-left: 30px;
}

.subheadline {
    font-size: 1.2em; 
    line-height: 1.4; 
    margin-bottom: 20px; 
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* --- 5. Form Styles --- */
.newsletter-form {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.form-group {
    width: 100%;
    max-width: 380px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-gold);
    font-weight: 500;
    text-align: left;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="tel"] {
    font-family: var(--font-body);
    font-size: 1.1em;
    width: 100%;
    padding: 18px 25px;
    border: 2px solid var(--color-gold);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}

.newsletter-form input[type="text"]:focus,
.newsletter-form input[type="tel"]:focus {
    border-color: var(--color-light-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6); 
}

.newsletter-form input[type="text"]::placeholder,
.newsletter-form input[type="tel"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.error-message {
    display: block;
    color: #ff6b6b;
    font-size: 0.9em;
    margin-top: 5px;
    text-align: center;
    min-height: 20px;
}

.join-button {
    background-color: var(--color-gold);
    color: var(--color-black);
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 380px;
    position: relative;
}

.join-button:hover:not(:disabled) {
    background-color: var(--color-light-gold);
    box-shadow: 0 0 20px var(--color-light-gold); 
    transform: translateY(-2px); 
}

.join-button:active:not(:disabled) {
    transform: translateY(0); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.join-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.join-button.loading {
    color: transparent;
}

.join-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(0,0,0,0.3);
    border-top-color: var(--color-black);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.consent-group {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    width: 100%;
    max-width: 380px;
    margin-top: 10px; 
    margin-bottom: 10px; 
    padding: 15px 0;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    color: var(--color-white);
    font-size: 0.9em;
    cursor: pointer;
    line-height: 1.6;
}

.consent-label span {
    flex: 1;
    text-align: left;
}

.consent-label a {
    color: var(--color-gold);
    text-decoration: underline;
    transition: color 0.2s;
}

.consent-group input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.2s;
}

.consent-group input[type="checkbox"]:checked {
    background-color: var(--color-gold);
}

#form-status {
    margin-top: 10px;
    font-weight: 600;
    text-align: center;
    min-height: 24px;
}

.status-success { color: #41b883; }
.status-error { color: #ff6b6b; }
.status-loading { color: var(--color-gold); }

/* Honeypot field */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* --- 6. Why Join Section --- */
.why-join-section {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 80px 0;
    text-align: center;
}

.why-join-section h2 {
    color: var(--color-gold);
    margin-bottom: 60px;
    font-size: 3em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.feature-item {
    padding: 30px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.08);
}

.feature-item h3 {
    color: var(--color-white);
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.feature-item p {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.7);
}

.gold-icon {
    font-size: 4.5em;
    color: var(--color-gold);
    margin-bottom: 15px;
    display: block;
}

/* --- 7. WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    width: 160px;
    height: 50px;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-gold);
    color: var(--color-black);
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float i {
    font-size: 1.4em;
    margin-right: 8px;
}

.whatsapp-float:hover {
    background-color: var(--color-light-gold);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
}

/* --- 8. Footer --- */
footer {
    background-color: var(--color-black);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
}

footer .container p {
    margin: 5px 0;
    color: inherit;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-gold);
}

/* --- 9. Media Queries --- */
@media (min-width: 992px) {
    .hero-content {
        flex-direction: row; 
        justify-content: space-around;
        align-items: center;
        gap: 50px;
    }
    
    .hero-text-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 50%;
    }

    .headline {
        font-size: 4.5em;
        text-align: left;
        margin-bottom: 10px;
    }

    .subheadline {
        font-size: 1.6em; 
        line-height: 1.5;
        text-align: left;
        margin-bottom: 0;
    }

    .newsletter-form {
        margin-top: 0;
        max-width: 450px;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .headline { font-size: 2.8em; }
    .subheadline { font-size: 1.1em; }
    h2 { font-size: 2em; }
    
    .newsletter-form input[type="text"],
    .newsletter-form input[type="tel"],
    .join-button,
    .consent-group,
    .form-group {
        width: 100%;
        max-width: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    
    .why-join-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .headline { font-size: 2em; line-height: 1.3; }
    .subheadline { font-size: 1em; margin-bottom: 30px; }
    h2 { font-size: 1.8em; }
    p { font-size: 0.95em; }
    .gold-icon { font-size: 3em; }
    
    .whatsapp-float {
        width: 140px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1em;
    }
}
