/*
 * Professional Modern Styles for Carnivore Lifestyles
 * Modern styling patterns adapted from CarnivoreTracker
 */

/* ===== CSS CUSTOM PROPERTIES (DESIGN TOKENS) ===== */
:root {
    /* Enhanced Color Palette - Dark Theme Optimized */
    --color-primary-50: #ff4444;   /* Now brightest for dark theme */
    --color-primary-100: #ff6666;
    --color-primary-200: #ff8888;
    --color-primary-300: #ffaaaa;
    --color-primary-400: #f87171;
    --color-primary-500: #ef4444;
    --color-primary-600: #FF4444;  /* Bright Red - visible on dark */
    --color-primary-700: #CC0000;
    --color-primary-800: #AA0000;
    --color-primary-900: #880000;

    /* Secondary Colors - Orange for Dark Theme */
    --color-secondary-100: #fff7ed;
    --color-secondary-200: #ffedd5;
    --color-secondary-300: #fed7aa;
    --color-secondary-400: #FF8C42;  /* Orange - accent for dark theme */
    --color-secondary-500: #ea580c;

    /* Action Color - Gold Accent */
    --color-cta: #FFD700;         /* Gold accent */
    --color-cta-hover: #FFC107;

    /* Gray Colors */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Common Colors */
    --color-white: #ffffff;
    --color-black: #000000;

    /* Modern spacing scale */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 2.5rem;   /* 40px */
    --spacing-3xl: 3rem;     /* 48px */
    --spacing-4xl: 4rem;     /* 64px */
    --spacing-5xl: 6rem;     /* 96px */

    /* Modern shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Modern transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-medium: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ===== MODERN ANIMATIONS ===== */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes liquid-flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px var(--color-secondary-400); }
    100% { box-shadow: 0 0 20px var(--color-secondary-400), 0 0 30px var(--color-secondary-400); }
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%; }
    75% { border-radius: 80% 20% 60% 40% / 20% 50% 80% 50%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== GRADIENT TEXT EFFECT ===== */
.gradient-text {
    background: linear-gradient(
        135deg,
        var(--color-primary-600) 0%,
        var(--color-cta) 25%,
        var(--color-secondary-400) 50%,
        var(--color-primary-600) 75%,
        var(--color-cta) 100%
    );
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 16s ease-in-out infinite;
}

/* ===== LIQUID BUTTON EFFECT ===== */
.btn-liquid {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-cta));
    color: white;
    border: none;
    z-index: 1;
}

.btn-liquid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: translateX(-100%);
    animation: liquid-flow 3s linear infinite;
    z-index: -1;
}

.btn-liquid:hover::before {
    animation-duration: 1s;
}

.btn-liquid:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== GLOW BOX EFFECT ===== */
@property --glow-size {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}

.glow-box {
    --glow-color: var(--color-secondary-400);
    --glow-size: 0px;
    box-shadow: 
        0 0 var(--glow-size) var(--glow-color),
        inset 0 0 calc(var(--glow-size) * 0.3) rgba(255, 215, 0, 0.1);
    transition: 
        --glow-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform var(--transition-medium);
}

.glow-box:hover {
    --glow-size: 15px;
}

/* ===== MAGNETIC CARD EFFECT ===== */
.magnetic-card {
    position: relative;
    transition: all var(--transition-medium);
    cursor: pointer;
}

.magnetic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(139, 0, 0, 0.05) 0%,
        rgba(255, 107, 107, 0.05) 50%,
        rgba(255, 215, 0, 0.05) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-medium);
    border-radius: inherit;
}

/* Desktop hover effects */
.magnetic-card:hover::after {
    opacity: 1;
}

.magnetic-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Mobile-friendly touch interactions */
.magnetic-card:active {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.magnetic-card:active::after {
    opacity: 0.7;
}

/* ===== FLOATING ANIMATION ===== */
.float-animation {
    animation: gentle-float 12s ease-in-out infinite;
}

/* Different delays for staggered effect */
.float-animation:nth-child(2) { animation-delay: -2s; }
.float-animation:nth-child(3) { animation-delay: -4s; }

/* ===== PULSE GLOW FOR STATS ===== */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

/* ===== HERO SECTION - DARK THEME ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg,
        #1a1a1a 0%,
        #2a2a2a 30%,
        #1f1f1f 70%,
        #0f0f0f 100%
    );
    min-height: 100vh;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse 80% 50% at 20% 20%,
        rgba(255, 68, 68, 0.12) 0%,
        rgba(255, 140, 66, 0.08) 30%,
        transparent 70%
    );
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 68, 68, 0.05) 0%,
        transparent 40%,
        rgba(255, 140, 66, 0.03) 80%,
        rgba(255, 215, 0, 0.02) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 120px 0 80px;
}

/* Additional lighting effects */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top right, rgba(255, 68, 68, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(255, 140, 66, 0.06) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

/* ===== BLOB BACKGROUND ===== */
.blob-bg {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 68, 68, 0.15) 0%,
        rgba(255, 140, 66, 0.12) 30%,
        rgba(255, 215, 0, 0.08) 60%,
        transparent 100%
    );
    animation: morph 20s ease-in-out infinite;
    z-index: 0;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(40px);
}

.blob-bg::before,
.blob-bg::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: morph 20s ease-in-out infinite;
}

.blob-bg::before {
    top: -100px;
    left: -100px;
}

.blob-bg::after {
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

/* ===== ENHANCED HEADER - DARK THEME ===== */
.site-header.modern {
    backdrop-filter: blur(10px);
    background: rgba(15, 15, 15, 0.95);
    transition: all var(--transition-medium);
}

.site-header.scrolled {
    background: rgba(15, 15, 15, 0.98);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

/* ===== MODERN NAV LINKS ===== */
.nav-link.modern {
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link.modern::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary-600), var(--color-secondary-400));
    transition: width var(--transition-fast);
}

.nav-link.modern:hover::after {
    width: 100%;
}

/* ===== CARD ENHANCEMENTS ===== */
.card.modern {
    transition: all var(--transition-medium);
    border: 1px solid var(--color-border);
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ensure CTA buttons align to bottom of cards */
.card .mt-lg {
    margin-top: auto;
    padding-top: var(--spacing-lg);
}

.card.modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-600), var(--color-secondary-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.card.modern:hover::before {
    transform: scaleX(1);
}

.card.modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
}

/* Mobile touch interactions for modern cards */
.card.modern:active::before {
    transform: scaleX(0.5);
}

.card.modern:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    border-color: var(--color-primary-light);
}

/* ===== TESTIMONIAL ENHANCEMENTS ===== */
.testimonial-card.modern {
    background: linear-gradient(135deg, var(--color-surface-elevated), var(--color-surface-hover));
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    transition: all var(--transition-medium);
}

.testimonial-card.modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile touch interactions for testimonial cards */
.testimonial-card.modern:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ===== SHINE EFFECT FOR BUTTONS ===== */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-shine:hover::before {
    left: 100%;
}

/* ===== MOBILE OVERFLOW FIX ===== */
body {
    overflow-x: hidden;
}

/* Contain sections with blob backgrounds */
.section {
    position: relative;
    overflow-x: hidden;
}

/* ===== RESPONSIVE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .blob-bg {
        width: 150px;
        height: 150px;
        top: -20px;
        right: -20px;
    }
    
    /* Reduce blob pseudo-elements on mobile */
    .blob-bg::before {
        top: -50px;
        left: -50px;
    }
    
    .blob-bg::after {
        bottom: -50px;
        right: -50px;
    }
    
    .magnetic-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .blob-bg,
    .float-animation,
    .pulse-glow,
    .gradient-text {
        animation: none !important;
    }
}

/* ===== HERO BUTTON CONSISTENCY ===== */
.hero-actions {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-actions .btn {
    min-width: 200px;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: center;
    }

    .hero-actions .btn {
        min-width: 180px;
    }
}

/* ===== COMPACT HERO VARIANT ===== */
.hero--compact {
    min-height: auto !important;
    padding: var(--spacing-4xl) 0;
}

.hero--compact .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero--compact .hero-title {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: var(--spacing-lg);
}

.hero--compact .hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero--compact .blob-bg {
        width: 150px;
        height: 150px;
        top: -20px;
        right: -20px;
    }
}

/* ===== MODERN FORM STYLES ===== */
.form-modern {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-3xl);
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
}

.form-section {
    margin-bottom: var(--spacing-3xl);
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--color-surface);
    color: var(--color-text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.3), 0 0 0 3px rgba(255, 68, 68, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.checkbox-item input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--color-primary-600);
}

.checkbox-item label {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    color: var(--color-gray-600);
}

.checkbox-item label strong {
    color: var(--color-gray-700);
}

.form-submit {
    text-align: center;
    margin-top: var(--spacing-3xl);
}

.form-submit .btn {
    min-width: 200px;
}

/* Form validation states */
.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
    border-color: var(--color-error);
}

.form-error-message {
    color: var(--color-error);
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-xs);
    display: none;
}

.form-group.error .form-error-message {
    display: block;
}

/* Mobile form adjustments */
@media (max-width: 768px) {
    .form-modern {
        padding: var(--spacing-xl);
        margin: var(--spacing-lg);
    }
    
    .form-section-title {
        font-size: var(--font-size-lg);
    }
}

/* ===== VISION CARDS ===== */
.vision-flow {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
}

.vision-cards .vision-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vision-card h4 {
    color: var(--color-primary-600);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    font-family: 'Montserrat', sans-serif;
}

.highlight-card {
    background: linear-gradient(135deg, var(--color-surface-elevated) 0%, var(--color-surface-hover) 100%);
    border: 2px solid var(--color-primary);
    color: var(--color-text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prominent-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary-700);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(139, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .prominent-text {
        font-size: 1.5rem;
    }
}

/* ===== PIONEER BENEFITS LIST ===== */
.pioneer-benefits,
.pioneer-requirements {
    list-style: none;
    padding: 0;
    margin: var(--spacing-lg) 0;
}

.pioneer-benefits li,
.pioneer-requirements li {
    position: relative;
    padding-left: 4rem !important;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.6;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.pioneer-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2rem;
}

.pioneer-requirements li::before {
    content: "•";
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary-600);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===== TIMELINE CARDS ===== */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.timeline-card {
    padding: var(--spacing-lg);
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-surface-elevated) 0%, var(--color-surface-hover) 100%);
    border-left: 4px solid var(--color-primary);
    color: var(--color-text-primary);
    transition: all var(--transition-medium);
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-left-color: var(--color-success);
}

.timeline-card strong {
    color: var(--color-primary);
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* ===== AMBER GLOW EFFECT ===== */
.amber-glow {
    color: #FF8C00 !important; /* Dark Orange */
    text-shadow: 
        0 0 10px rgba(255, 140, 0, 0.8),
        0 0 20px rgba(255, 140, 0, 0.6),
        0 0 30px rgba(255, 140, 0, 0.4);
    animation: amber-pulse 2s ease-in-out infinite alternate;
}

@keyframes amber-pulse {
    0% {
        text-shadow: 
            0 0 10px rgba(255, 140, 0, 0.8),
            0 0 20px rgba(255, 140, 0, 0.6),
            0 0 30px rgba(255, 140, 0, 0.4);
    }
    100% {
        text-shadow: 
            0 0 15px rgba(255, 140, 0, 1),
            0 0 25px rgba(255, 140, 0, 0.8),
            0 0 35px rgba(255, 140, 0, 0.6);
    }
}

/* ===== FOCUS STATES ===== */
.btn-liquid:focus,
.glow-box:focus,
.magnetic-card:focus {
    outline: 2px solid var(--color-primary-600);
    outline-offset: 2px;
}