/**
 * Referral Landing Page V3 - Layout & Base
 * 
 * Modern 2026 styles with Ultra Dark Mode support.
 * Content is VISIBLE by default - animations are progressive enhancement.
 */

/* ============================================
   Base Styles
   ============================================ */
.referral-landing {
    font-family: var(--font-family-body, 'Poppins', sans-serif);
    color: var(--color-text-primary, #333333);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    background: var(--color-background, #ffffff);
    transition: background 0.3s ease, color 0.3s ease;
}

.referral-landing *,
.referral-landing *::before,
.referral-landing *::after {
    box-sizing: border-box;
}

/* ============================================
   DARK MODE - Uses Core Design System
   ============================================ */
[data-theme="dark"] .referral-landing {
    background: var(--color-dark-bg, #1a1a1a);
    color: var(--color-dark-text, #f8f9fa);
}

/* ============================================
   Container
   ============================================ */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
    width: 100%;
}

/* ============================================
   Section Base
   ============================================ */
.landing-section {
    padding: clamp(4rem, 8vw, 6rem) 0;
    width: 100%;
    position: relative;
}

.landing-section--alt {
    background: var(--color-background-secondary, #f8f9fa);
}

[data-theme="dark"] .landing-section--alt {
    background: var(--color-dark-bg-light, #0a0a0a);
}

.landing-section--legal {
    background: rgba(12, 35, 64, 0.03);
    padding: clamp(2rem, 4vw, 3rem) 0;
}

[data-theme="dark"] .landing-section--legal {
    background: var(--color-dark-bg-light, #0a0a0a);
}

/* ============================================
   Typography Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3.5rem;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm, 0.5rem);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--accent-color, #d4af37);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-md, 1rem);
}

[data-theme="dark"] .section-eyebrow {
    color: var(--accent-color-light, #e9d38b);
}

.section-title {
    font-family: var(--font-family-heading, 'Playfair Display', serif);
    font-size: clamp(var(--font-size-2xl, 1.5rem), 4vw, var(--font-size-4xl, 2.25rem));
    font-weight: var(--font-weight-bold, 700);
    color: var(--color-text-primary, #333333);
    margin: 0 0 var(--spacing-md, 1rem);
    line-height: 1.15;
}

[data-theme="dark"] .section-title {
    color: var(--color-dark-text, #f8f9fa);
}

.section-description {
    font-size: var(--font-size-lg, 1.125rem);
    color: var(--color-text-secondary, #666666);
    line-height: var(--line-height-relaxed, 1.7);
    margin: 0 auto;
    max-width: 700px;
}

[data-theme="dark"] .section-description {
    color: var(--color-dark-text-secondary, rgba(255, 255, 255, 0.7));
}

/* ============================================
   ANIMATIONS - Progressive Enhancement
   ============================================ */

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Default: Content is VISIBLE */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* When JS is enabled and hasn't run yet, prepare for animation */
.js-enabled .animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
}

/* When animation triggers */
.animate-on-scroll.visible,
.js-enabled .animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Staggered Delays */
.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }

/* Reduced motion: skip animations entirely */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .js-enabled .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}
