/* 
   =========================================
   CSS VARIABLES & RESET
   ========================================= 
*/
:root {
    /* Color Palette */
    --color-primary: #0f766e; /* Teal 700 */
    --color-primary-hover: #0d9488; /* Teal 600 */
    --color-primary-light: #ccfbf1; /* Teal 50 */
    
    --color-text-dark: #0f172a; /* Slate 900 */
    --color-text-body: #334155; /* Slate 700 */
    --color-text-muted: #64748b; /* Slate 500 */
    
    --color-bg-light: #f8fafc; /* Slate 50 */
    --color-bg-card: rgba(255, 255, 255, 0.95);
    
    --color-error: #ef4444; /* Red 500 */
    --color-error-bg: #fef2f2;
    --color-success: #10b981; /* Emerald 500 */
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows & Radii */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-teal: 0 10px 25px -5px rgba(15, 118, 110, 0.4);
    
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Layout */
    --max-width: 1100px;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text-body);
    line-height: 1.6;
    background-color: var(--color-bg-light);
    -webkit-font-smoothing: antialiased;
}

/* REQUIRED UTILITY */
.hidden {
    display: none !important;
}

/* 
   =========================================
   LAYOUT & CONTAINERS
   ========================================= 
*/
.page-wrapper {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Overlay to ensure text readability over background image */
.page-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(241,245,249,0.8) 100%);
    z-index: 0;
}

.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .main-container {
        padding: 3rem 1.5rem;
    }
}

/* 
   =========================================
   LEFT COLUMN (TYPOGRAPHY & CONTENT)
   ========================================= 
*/
.content-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.eyebrow {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--color-primary-light);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    align-self: flex-start;
}

.headline {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--color-text-dark);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.description {
    font-size: 1.125rem;
    color: var(--color-text-body);
    max-width: 500px;
    margin-bottom: 1rem;
}

.bullet-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bullet-points li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
}

.bullet-points svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    margin-top: 2px;
}

/* 
   =========================================
   COUNTDOWN TIMER
   ========================================= 
*/
#countdown-section {
    margin-top: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.countdown-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
}

.countdown-timer {
    display: flex;
    gap: 1rem;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 1rem;
    border-radius: var(--radius-md);
    min-width: 80px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

.time-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}

.ended-msg {
    color: var(--color-error);
    font-weight: 600;
    font-size: 1.1rem;
}

@media (max-width: 500px) {
    .countdown-timer {
        gap: 0.5rem;
    }
    .time-box {
        min-width: 65px;
        padding: 0.75rem 0.5rem;
    }
    .time-value {
        font-size: 1.5rem;
    }
}

/* 
   =========================================
   RIGHT COLUMN (FORM CARD)
   ========================================= 
*/
.glass-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.glass-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.form-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text-dark);
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    background-color: #ffffff;
}

/* Custom Select Styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Buttons */
.submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.submit-btn:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-teal);
}

.submit-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.terms-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
}

.terms-text a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Alerts & Errors */
.error-message {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid #fecaca;
}

.status-alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
}

.status-alert.ended {
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid #fca5a5;
}

.status-alert.soon {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fcd34d;
}

/* 
   =========================================
   SUCCESS / THANK YOU CARD
   ========================================= 
*/
#success-card {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #d1fae5;
    color: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon svg {
    width: 32px;
    height: 32px;
}

#success-card h2 {
    margin-bottom: 1rem;
}

#success-card p {
    color: var(--color-text-body);
    margin-bottom: 2rem;
}

/* Share Panel */
.share-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.share-section h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.share-section p {
    font-size: 0.9rem;
    margin-bottom: 1rem !important;
}

.share-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.share-input-group input {
    flex: 1;
    background: #ffffff;
    margin: 0;
}

.secondary-btn {
    padding: 0.875rem 1.25rem;
    background: var(--color-text-body);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: var(--color-text-dark);
}

.social-share-buttons {
    display: flex;
    gap: 0.75rem;
}

.social-btn {
    flex: 1;
    display: inline-block;
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.social-btn:hover {
    opacity: 0.9;
}

.fb-btn { background: #1877F2; }
.tw-btn { background: #000000; }

/* 
   =========================================
   FOOTER
   ========================================= 
*/
.site-footer {
    margin-top: auto;
    padding-top: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-links .separator {
    color: #cbd5e1;
}

.copyright {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Powered By Slot needs to be at the bottom */
#wbx-powered-by-slot {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* 
   =========================================
   MODAL (RULES)
   ========================================= 
*/
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-dark);
}

.close-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f1f5f9;
    color: var(--color-text-dark);
}

.close-btn svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    color: var(--color-text-body);
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
}
