/* 
 * Renaissance Man Press - Custom Styles
 * Built on top of Pico.css
 * Color scheme: Deep blue and gold accents (renaissance-inspired)
 */

:root {
    --primary: #1a365d;
    --primary-hover: #2c5282;
    --accent: #c9a227;
    --accent-light: #e6c84a;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

/* Typography */
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--primary);
}

/* Header & Navigation */
header {
    background: var(--primary);
    padding: 0.5rem 0;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

header nav a:hover,
header nav a.active {
    color: var(--accent);
}

header .logo {
    font-size: 1.25rem;
}

/* Logo styling */
.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 36px;
    width: auto;
    border-radius: 4px;
}

main {
    padding-top: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #2c5282 100%);
    color: white;
    border-radius: 0.5rem;
    margin-bottom: 3rem;
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta a[role="button"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
    font-weight: 600;
}

.hero-cta a[role="button"]:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

.hero-cta a.secondary {
    background: transparent;
    border-color: white;
    color: white;
}

.hero-cta a.secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--accent);
}

.page-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-style: italic;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

section h2 {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

/* Topic Cards */
#topics article,
.book-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

#topics article:hover,
.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#topics article header,
.book-card header {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    padding: 0;
    background: none;
    border: none;
}

/* Book Status Badges */
.book-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.book-status {
    background: var(--accent);
    color: var(--primary);
}

.book-status.available {
    background: #22c55e;
    color: white;
}

.book-status.coming-soon {
    background: var(--primary);
    color: white;
}

.book-card.coming-soon-card {
    cursor: pointer;
}

.book-cover-wrap {
    position: relative;
    overflow: hidden;
}

.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 54, 93, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.book-card.coming-soon-card:hover .coming-soon-overlay {
    opacity: 1;
}

.coming-soon-overlay span {
    background: var(--accent);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
}

.notify-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.notify-modal-backdrop.active {
    display: flex;
}

.notify-modal {
    background: white;
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.notify-modal h2 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.notify-modal .modal-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.notify-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.notify-modal-close:hover {
    color: var(--primary);
}

.btn-waitlist {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-top: 0.25rem;
}

.btn-waitlist:hover {
    background: #b8911f;
    color: white;
    transform: translateY(-1px);
}

.btn-kindle {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    margin-top: 0.25rem;
}

.btn-kindle:hover {
    background: #0f2440;
    color: white;
    transform: translateY(-1px);
}

/* Books Grid with Covers */
.books-grid,
.featured-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.book-card.with-cover {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-card.with-cover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.book-cover {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: top;
}

.book-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.book-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
    flex-grow: 1;
}

.book-author {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    margin: 0;
}

.submission-card {
    text-decoration: none;
    cursor: pointer;
}


.submission-card:hover .book-link {
    color: var(--accent);
}

.book-link {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin: 0;
    transition: color 0.2s;
}

/* Flash Messages */
.flash-message {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.flash-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Forms */
form label {
    font-weight: 600;
    color: var(--primary);
}

form button[type="submit"] {
    background: var(--primary);
    border-color: var(--primary);
}

form button[type="submit"]:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.form-placeholder {
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    padding: 2rem;
    text-align: center;
    border-radius: 0.5rem;
    color: var(--text-muted);
}

/* Blockquotes */
blockquote {
    background: #fff9e6;
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

/* Details/FAQ */
details {
    margin-bottom: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-bottom: 2rem;
}

footer hr {
    border-color: var(--border-color);
    margin-bottom: 2rem;
}

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

.footer-info p {
    margin: 0.25rem 0;
    color: var(--text-muted);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin: 0.5rem 0;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-social {
    color: var(--text-muted);
}

.footer-social a {
    color: var(--primary);
}

/* Utility Classes */
.center {
    text-align: center;
}

.coming-soon-notice {
    background: var(--bg-light);
    padding: 2rem;
    text-align: center;
    border-radius: 0.5rem;
    color: var(--text-muted);
}

.alt-contact {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cta-section {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.cta-section a[role="button"] {
    margin: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .footer-content {
        text-align: center;
    }
}
