/**
 * Bloodvine Crusade Website Styles
 * Based on original elegant cream/red design
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #8B1A1A;
    --dark-red: #5C0F0F;
    --accent-gold: #C7A66D;
    --background: #FAF8F3;
    --text-dark: #1a1a1a;
    --text-mid: #4a4a4a;
    --text-light: #6a6a6a;
    --border-light: #e5e0d8;
}

body {
    font-family: 'EB Garamond', serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 18px;
}

/* Subtle pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(139, 26, 26, 0.02) 19px, rgba(139, 26, 26, 0.02) 20px);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 3rem;
    position: relative;
    z-index: 2;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'IM Fell English', serif;
    font-weight: normal;
}

/* Header / Navigation */
header {
    padding: 6rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.header-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.logo {
    font-family: 'IM Fell English', serif;
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: normal;
    color: var(--primary-red);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.subtitle {
    font-family: 'IM Fell English', serif;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: var(--text-mid);
    font-style: italic;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin-top: 2rem;
    font-family: 'Source Sans 3', sans-serif;
}

.nav-link {
    color: var(--text-mid);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-red);
}

/* Section styling */
section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-light);
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-family: 'IM Fell English', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: normal;
    color: var(--dark-red);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.section-intro {
    max-width: 750px;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--text-mid);
    font-size: 1.1rem;
}

/* Email Capture */
.email-capture {
    background: white;
    border: 2px solid var(--primary-red);
    padding: 3rem;
    margin: 3rem auto;
    max-width: 850px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.email-capture h3 {
    font-family: 'IM Fell English', serif;
    font-size: 2rem;
    color: var(--primary-red);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: normal;
}

.email-capture-intro {
    text-align: center;
    color: var(--text-mid);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.email-capture-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-input {
    padding: 1rem;
    background: var(--background);
    border: 1px solid var(--border-light);
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.form-input.valid {
    border-color: #4a7c2a;
}

.form-input.invalid {
    border-color: var(--primary-red);
}

.btn {
    padding: 1rem 2rem;
    background-color: var(--primary-red);
    color: white;
    border: none;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--dark-red);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-message {
    padding: 1rem;
    margin-top: 1rem;
    display: none;
    text-align: center;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
}

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

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

/* Downloads */
.download-category {
    margin-bottom: 4rem;
}

.category-title {
    font-family: 'IM Fell English', serif;
    font-size: 2rem;
    color: var(--dark-red);
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-weight: normal;
}

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

.download-card {
    background: white;
    padding: 2.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.download-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.download-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.download-title {
    font-family: 'IM Fell English', serif;
    font-size: 1.5rem;
    color: var(--primary-red);
    margin: 0;
    font-weight: normal;
}

.download-version {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.download-description {
    color: var(--text-mid);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.download-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.85rem;
    color: var(--text-light);
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-red);
    color: white;
    text-decoration: none;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
}

.download-button:hover {
    background-color: var(--dark-red);
}

.download-icon {
    width: 16px;
    height: 16px;
}

/* Gallery */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: white;
    color: var(--text-mid);
    border: 1px solid var(--border-light);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: white;
    border: 1px solid var(--border-light);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    font-family: 'IM Fell English', serif;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: normal;
}

.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: 'Source Sans 3', sans-serif;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    gap: 3rem;
}

.lightbox-image {
    max-width: 70%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-info {
    flex: 1;
    color: white;
    overflow-y: auto;
}

.lightbox-title {
    font-family: 'IM Fell English', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: normal;
}

.lightbox-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.lightbox-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background-color: rgba(139, 26, 26, 0.8);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: background-color 0.2s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--primary-red);
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

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

.feature {
    padding: 2rem 0;
}

.feature-number {
    font-family: 'IM Fell English', serif;
    font-size: 3rem;
    color: var(--primary-red);
    opacity: 0.3;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.feature h3 {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.3rem;
    color: var(--dark-red);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.feature p {
    color: var(--text-mid);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Info box styling */
.info-box {
    background: white;
    border: 2px solid var(--primary-red);
    padding: 3rem;
    margin: 3rem auto;
    max-width: 850px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.info-box h3 {
    font-family: 'IM Fell English', serif;
    font-size: 1.5rem;
    color: var(--dark-red);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: normal;
}

.info-box ul {
    color: var(--text-mid);
    margin-left: 2rem;
}

.info-box p {
    color: var(--text-mid);
}

/* Utility Classes */
.no-downloads,
.no-images,
.error-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    font-style: italic;
}

.error-message {
    color: var(--primary-red);
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.85rem;
    color: var(--text-light);
}

footer p {
    margin: 0.3rem 0;
}

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

    section {
        padding: 3rem 0;
    }

    header {
        padding: 4rem 0 3rem;
    }

    .header-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .email-capture,
    .info-box {
        padding: 2rem 1.5rem;
    }

    .downloads-grid,
    .features,
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .lightbox-content {
        flex-direction: column;
    }

    .lightbox-image {
        max-width: 100%;
    }

    .lightbox-info {
        max-height: 30vh;
    }
}

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