/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2563eb;
}

.btn-primary {
    background: #2563eb;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.mobile-menu-toggle:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    background-color: rgba(37, 99, 235, 0.1);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    display: block;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-quote {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #60a5fa;
    font-style: italic;
}

.hero-quote cite {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
    font-style: normal;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #fff;
    color: #2563eb;
}

.btn-primary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-2px);
}

/* Book Cover */
.book-cover {
    perspective: 1000px;
    width: 300px;
    height: 400px;
    margin: 0 auto;
    position: relative;
    transition: transform 0.3s ease;
}

.book-cover:hover {
    transform: scale(1.05);
}

.book-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.book-cover:hover .book-cover-image {
    transform: rotateY(-10deg) rotateX(10deg) scale(1.02);
}

/* About Section */
.about {
    padding: 80px 0;
    background: #f8fafc;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1e293b;
}

.about > .container > p {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: #64748b;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.feature h3 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background: white;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.5rem;
    border-left: 4px solid #2563eb;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
    color: #334155;
}

.testimonial cite {
    font-weight: 600;
    color: #2563eb;
    font-style: normal;
}

/* Table of Contents */
.table-of-contents {
    padding: 80px 0;
    background: #f8fafc;
}

.table-of-contents h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.toc-chapter {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toc-chapter h3 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.toc-chapter ul {
    list-style: none;
}

.toc-chapter li {
    padding: 0.25rem 0;
    color: #64748b;
    position: relative;
    padding-left: 1rem;
}

.toc-chapter li:before {
    content: "•";
    color: #2563eb;
    position: absolute;
    left: 0;
}

/* Author Section */
.author {
    padding: 80px 0;
    background: white;
}

.author h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

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

.author-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.author-text a {
    color: #2563eb;
    text-decoration: none;
}

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

.author-signature {
    font-style: italic;
    font-weight: 600;
    color: #2563eb;
    margin-top: 2rem;
}

/* Purchase Section */
.purchase {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.purchase h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.purchase-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.purchase-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.purchase-option.featured {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.purchase-option h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 1rem;
}

.purchase-option p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.purchase-option ul {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.purchase-option li {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    position: relative;
    padding-left: 1.5rem;
}

.purchase-option li:before {
    content: "✓";
    color: #60a5fa;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.gumroad-container,
.lulu-container {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.gumroad-container em,
.lulu-container em {
    color: #fbbf24;
}

/* Spread Word Section */
.spread-word {
    padding: 60px 0;
    background: #f8fafc;
    text-align: center;
}

.spread-word h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1e293b;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-btn.twitter {
    background: #1da1f2;
    color: white;
}

.social-btn.facebook {
    background: #4267b2;
    color: white;
}

.social-btn.linkedin {
    background: #0077b5;
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer a {
    color: #60a5fa;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .book-cover {
        width: 250px;
        height: 330px;
    }
    
    .book-cover-image {
        transform: rotateY(-2deg) rotateX(2deg);
    }
    
    .book-cover:hover .book-cover-image {
        transform: rotateY(-5deg) rotateX(5deg) scale(1.02);
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }
    
    .purchase-options {
        grid-template-columns: 1fr;
    }
    
    .purchase-option.featured {
        transform: none;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .book-cover {
        width: 200px;
        height: 270px;
    }
    
    .book-cover-image {
        transform: rotateY(-1deg) rotateX(1deg);
    }
    
    .book-cover:hover .book-cover-image {
        transform: rotateY(-3deg) rotateX(3deg) scale(1.01);
    }
    
    section {
        padding: 60px 0 !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

.hero-content,
.feature,
.testimonial,
.toc-chapter {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Ensure adequate color contrast */
.testimonial cite {
    font-weight: 600;
    color: #1d4ed8; /* Darker blue for better contrast */
    font-style: normal;
}

.author-text a {
    color: #1d4ed8; /* Darker blue for better contrast */
    text-decoration: none;
}

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

.author-signature {
    font-style: italic;
    font-weight: 600;
    color: #1d4ed8; /* Darker blue for better contrast */
    margin-top: 2rem;
}

/* Improve button focus states */
.btn:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.social-btn:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-quote {
        background: rgba(255, 255, 255, 0.2);
        border-left: 4px solid #fff;
    }
    
    .testimonial {
        border-left: 4px solid #000;
    }
    
    .toc-chapter li:before {
        color: #000;
    }
}
