:root {
    --primary-color: #039be5;
    --text-color: #333;
    --bg-color: #fdfdfd;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-border: #e0e0e0;
    --spacing-unit: 1rem;
    --max-width: 800px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-border);
    padding: var(--spacing-unit) 0;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    width: 100%;
    box-sizing: border-box;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 1rem;
    font-size: 0.9rem;
}

.nav-links a:hover, .logo:hover {
    color: var(--primary-color);
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.app-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px; /* Apple-like squircle approx */
    margin-bottom: 0; /* Handled by flex gap */
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.01);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-icon:hover {
    transform: scale(1.05) rotate(2deg);
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: #0277bd;
}

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

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}

.feature-card h3 {
    margin-top: 0;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* AI Search Section */
.ai-search-section {
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    padding: 5rem 0;
    margin: 4rem 0;
    border-top: 1px solid #e1e8ed;
    border-bottom: 1px solid #e1e8ed;
}

.ai-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.ai-badge {
    background: linear-gradient(90deg, #FFD700, #FFA500); /* Gold-ish for 'Premium/AI' feel */
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ai-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.ai-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

/* Books Grid */
.books-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--gray-border);
    transition: all 0.2s ease;
}

.book-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(3, 155, 229, 0.1);
}

.book-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.book-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}


/* Form Styles */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-border);
    max-width: 500px;
    margin: 0 auto;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.8rem;
    color: #888;
}

button[type="submit"] {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button[type="submit"]:hover {
    background-color: #0277bd;
}

button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.message-success {
    color: green;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.message-error {
    color: red;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

footer {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid var(--gray-border);
    margin-top: auto;
}

footer a {
    color: #666;
    text-decoration: none;
    margin: 0 0.5rem;
}

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

/* Modern Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .app-icon {
        width: 80px;
        height: 80px;
        border-radius: 18px;
        margin-bottom: 1.5rem;
    }

    .ai-search-section {
        padding: 3rem 0;
    }

    .ai-content h2 {
        font-size: 1.75rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }
}

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

.hero > *, .ai-content > *, .books-grid > *, .features > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items handled in JS or via nth-child loops if fixed count */
.books-grid .book-card:nth-child(2) { transition-delay: 0.1s; }
.books-grid .book-card:nth-child(3) { transition-delay: 0.2s; }
.books-grid .book-card:nth-child(4) { transition-delay: 0.3s; }

/* Enhanced Modern Typography & Colors */
:root {
    --primary-color: #0284c7; /* Newer, slightly deeper blue */
    --accent-color: #f0f9ff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --bg-color: #ffffff;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden; /* Prevent horizontal scroll from background effects */
}

/* Background Gradients/Blobs */
.bg-gradient-1 {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.bg-gradient-2 {
    position: absolute;
    top: 40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0284c7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero {
    /* Removed redundant flex/padding from old def since we overwrote it above or below */
    position: relative;
    /* Removed old radial gradient to use new blob system */
}

.hero h1 {
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-size: 3.5rem; /* Larger, more impactful */
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Modern Pill Button */
.cta-button {
    background-color: var(--primary-color);
    border-radius: 9999px; /* Pill shape */
    padding: 1rem 2rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2), 0 2px 4px -1px rgba(2, 132, 199, 0.1);
    transition: all 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.3), 0 4px 6px -2px rgba(2, 132, 199, 0.1);
    background-color: #0369a1;
}

/* Card Improvements */
.book-card, .feature-card {
    border: 1px solid var(--border-color);
    box-shadow: none; /* Flat by default */
}

.book-card:hover, .feature-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    transform: translateY(-4px);
}
