/* Connor Blake Author Website - Modern Styles */

/* Custom CSS Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
}

/* Typography */
body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

/* Custom Bootstrap Overrides */
.btn-primary {
    background: #667eea; /* Fallback */
    background: -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -moz-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    -webkit-box-shadow: var(--shadow-lg);
    -moz-box-shadow: var(--shadow-lg);
    background: #667eea; /* Fallback */
    background: -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -moz-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    filter: brightness(1.1);
    -webkit-filter: brightness(1.1);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    -webkit-box-shadow: var(--shadow-md);
    -moz-box-shadow: var(--shadow-md);
}

.btn-outline-light {
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-family: var(--font-heading);
    color: var(--primary-color) !important;
    font-size: 1.75rem !important;
    transition: all 0.3s ease;
    font-weight: 600;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.75rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    background: #f8f9fa; /* Fallback */
    background: -webkit-linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    background: -moz-linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    background: -o-linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    min-height: 100vh;
    display: flex;
    display: -webkit-flex;
    display: -moz-flex;
    align-items: center;
    -webkit-align-items: center;
    -moz-align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(0,0,0,0.02)" stroke-width="1"/></pattern></defs><rect width="60" height="60" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: fadeInUp 1s ease-out;
    -webkit-animation: fadeInUp 1s ease-out;
    -moz-animation: fadeInUp 1s ease-out;
    margin-bottom: 0.5rem;
}

.hero-section .lead {
    color: #4a5568;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.2s both;
    -webkit-animation: fadeInUp 1s ease-out 0.2s both;
    -moz-animation: fadeInUp 1s ease-out 0.2s both;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.hero-section .fs-5 {
    color: #6b7280;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.4s both;
    -webkit-animation: fadeInUp 1s ease-out 0.4s both;
    -moz-animation: fadeInUp 1s ease-out 0.4s both;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-section .d-flex {
    animation: fadeInUp 1s ease-out 0.6s both;
    -webkit-animation: fadeInUp 1s ease-out 0.6s both;
    -moz-animation: fadeInUp 1s ease-out 0.6s both;
}

/* Enhanced button styles for hero section */
.hero-section .btn-primary {
    background: #667eea; /* Fallback */
    background: -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -moz-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    -webkit-box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    -moz-box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
}

.hero-section .btn-primary:hover {
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    -webkit-box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    -moz-box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.hero-section .btn-outline-primary {
    color: #4a5568;
    border-color: #d1d5db;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 500;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-width: 2px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
}

.hero-section .btn-outline-primary:hover {
    background: #4a5568;
    border-color: #4a5568;
    color: #ffffff;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 85, 104, 0.3);
    -webkit-box-shadow: 0 6px 20px rgba(74, 85, 104, 0.3);
    -moz-box-shadow: 0 6px 20px rgba(74, 85, 104, 0.3);
}

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

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

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

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

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

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

@keyframes shimmer {
    0% { 
        transform: translateX(-100%);
        -webkit-transform: translateX(-100%);
        -moz-transform: translateX(-100%);
    }
    100% { 
        transform: translateX(100%);
        -webkit-transform: translateX(100%);
        -moz-transform: translateX(100%);
    }
}

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

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

/* Card Enhancements */
.card {
    border: none;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    -webkit-box-shadow: var(--shadow-sm);
    -moz-box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-5px);
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    -webkit-box-shadow: var(--shadow-lg);
    -moz-box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 2rem;
}

/* Book Cover Modern Effects */
.book-cover-modern {
    transition: all 0.4s ease;
    -webkit-transition: all 0.4s ease;
    -moz-transition: all 0.4s ease;
    -o-transition: all 0.4s ease;
    border-radius: 15px !important;
    -webkit-border-radius: 15px !important;
    -moz-border-radius: 15px !important;
    box-shadow: var(--shadow-lg);
    -webkit-box-shadow: var(--shadow-lg);
    -moz-box-shadow: var(--shadow-lg);
}

.book-cover-modern:hover {
    transform: scale(1.05) rotateY(5deg);
    -webkit-transform: scale(1.05) rotateY(5deg);
    -moz-transform: scale(1.05) rotateY(5deg);
    box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.3);
    -moz-box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.3);
}

.book-cover-container {
    perspective: 1000px;
    -webkit-perspective: 1000px;
    -moz-perspective: 1000px;
}

/* Author Photo Modern Effects */
.author-photo-modern {
    transition: all 0.4s ease;
    -webkit-transition: all 0.4s ease;
    -moz-transition: all 0.4s ease;
    -o-transition: all 0.4s ease;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    -webkit-box-shadow: var(--shadow-lg);
    -moz-box-shadow: var(--shadow-lg);
}

.author-photo-modern:hover {
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.author-photo-container {
    perspective: 1000px;
    -webkit-perspective: 1000px;
    -moz-perspective: 1000px;
}

.author-fallback {
    transition: all 0.4s ease;
    -webkit-transition: all 0.4s ease;
    -moz-transition: all 0.4s ease;
    -o-transition: all 0.4s ease;
    border: 4px solid white;
    background: #6c757d; /* Fallback */
    background: -webkit-linear-gradient(135deg, #6c757d, #495057);
    background: -moz-linear-gradient(135deg, #6c757d, #495057);
    background: -o-linear-gradient(135deg, #6c757d, #495057);
    background: linear-gradient(135deg, #6c757d, #495057);
    display: flex;
    display: -webkit-flex;
    display: -moz-flex;
    align-items: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    font-size: 3rem;
    font-weight: 300;
    color: white;
}

.author-fallback:hover {
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

/* Purchase Cards */
.purchase-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    color: inherit;
    background: white;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.purchase-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: inherit;
    background: linear-gradient(135deg, #f8f9fa, white);
    text-decoration: none;
}

.purchase-card .bi {
    transition: all 0.3s ease;
}

.purchase-card:hover .bi {
    transform: scale(1.2);
}

.purchase-card .card-body {
    padding: 1.5rem;
}

/* Badges */
.badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Blockquote */
.blockquote {
    border-left: 4px solid var(--accent-color);
    font-size: 1.1rem;
    position: relative;
    padding: 1.5rem 2rem;
    font-style: italic;
}

.blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--accent-color);
    position: absolute;
    top: -10px;
    left: -10px;
    font-family: var(--font-heading);
    opacity: 0.3;
}

/* Form Enhancements */
.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 144, 219, 0.25);
}

.form-control-lg {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
}

.form-control-lg:hover {
    border-color: var(--accent-color);
}

/* Section Spacing */
section {
    position: relative;
    overflow: hidden;
}

.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><defs><pattern id="dots" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="50" height="50" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

footer .container {
    position: relative;
    z-index: 2;
}

footer .btn-outline-light {
    transition: all 0.3s ease;
}

footer .btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 60px rgba(102, 126, 234, 0.1);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* Icon colors for merchants */
.bi-amazon { color: #FF9900; }
.bi-headphones { color: #FF6600; }
.bi-apple { color: #007AFF; }
.bi-google-play { color: #4285F4; }
.bi-shop { color: #00A651; }
.bi-tablet { color: #68217A; }

/* Book placeholder */
.book-placeholder {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 100px;
        min-height: 70vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .book-cover-modern,
    .author-photo-modern,
    .author-fallback {
        width: 150px !important;
        height: 150px !important;
        max-width: 150px !important;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .purchase-card .card-body {
        padding: 1rem !important;
    }
    
    .navbar-nav {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 10px;
        margin-top: 1rem;
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.5rem;
    }
    
    .book-cover-modern,
    .author-photo-modern,
    .author-fallback {
        width: 120px !important;
        height: 120px !important;
        max-width: 120px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .purchase-card .bi {
        font-size: 1.5rem !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .purchase-card {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 2rem 0;
        min-height: auto;
    }
    
    .hero-section h1,
    .hero-section .lead,
    .hero-section .fs-5 {
        color: black !important;
        text-shadow: none !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
        --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    }
    
    .card {
        border: 2px solid var(--text-dark);
    }
    
    .btn-primary {
        background: var(--primary-color);
        border: 2px solid var(--primary-color);
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e9ecef;
        --bg-light: #2c3e50;
    }
    
    body {
        background-color: #1a1a1a;
        color: var(--text-dark);
    }
    
    .navbar {
        background: rgba(52, 58, 64, 0.95) !important;
    }
    
    .card {
        background-color: #2c3e50;
        color: white;
    }
    
    .bg-light {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    }
}