/* ============================================
   CSS Variables & Base Styles
   ============================================ */

:root {
    --iron-gray: #2c2c2c;
    --gunmetal: #1a1a1a;
    --charcoal: #0d0d0d;
    --cream: #f5f5f0;
    --ivory: #fafaf5;
    --metallic: #4a4a4a;
    --accent-gold: #c9a961;
    --text-light: #e0e0e0;
    --text-dark: #1a1a1a;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--charcoal);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.05em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--cream);
}

/* ============================================
   Container & Layout
   ============================================ */

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

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

.section-title {
    color: var(--cream);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    margin: 1rem auto;
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    background: var(--charcoal);
    transform: translateY(-50%);
}

.section-divider::before {
    left: -20px;
}

.section-divider::after {
    right: -20px;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Cinzel', serif;
}

.logo-image {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.logo-type {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--cream);
}

.logo-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    margin-top: -4px;
}

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

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--cream);
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--gunmetal) 50%, var(--iron-gray) 100%);
    z-index: -2;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(201, 169, 97, 0.03) 2px, rgba(201, 169, 97, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(201, 169, 97, 0.03) 2px, rgba(201, 169, 97, 0.03) 4px);
    opacity: 0.5;
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-gate {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 300px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.1;
}

.gate-left,
.gate-right {
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    border: 2px solid var(--accent-gold);
    transition: transform 2s ease;
}

.gate-left {
    left: 0;
    border-right: none;
    transform-origin: left center;
}

.gate-right {
    right: 0;
    border-left: none;
    transform-origin: right center;
}

.hero-gate.opened .gate-left {
    transform: rotateY(-90deg);
}

.hero-gate.opened .gate-right {
    transform: rotateY(90deg);
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-logo {
    max-width: min(560px, 90vw);
    width: 100%;
    height: auto;
    margin: 0 auto 1.75rem;
    display: block;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.5));
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--cream);
    text-shadow: 0 0 30px rgba(201, 169, 97, 0.3);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
}

.hero-tagline {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta-button:hover {
    color: var(--charcoal);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.4);
}

.cta-button:hover::before {
    left: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--accent-gold);
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid var(--accent-gold);
}

/* ============================================
   About Section
   ============================================ */

.about {
    padding: 6rem 0;
    background: var(--gunmetal);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

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

.about-text {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    opacity: 0.9;
    text-align: justify;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* ============================================
   Catalog Section
   ============================================ */

.catalog {
    padding: 6rem 0;
    background: var(--charcoal);
}

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

.book-card {
    background: var(--gunmetal);
    border: 1px solid rgba(201, 169, 97, 0.2);
    transition: var(--transition);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.book-card:nth-child(1) { animation-delay: 0.1s; }
.book-card:nth-child(2) { animation-delay: 0.2s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }
.book-card:nth-child(4) { animation-delay: 0.4s; }

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.book-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: var(--iron-gray);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 13, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.book-link {
    padding: 0.75rem 1.5rem;
    background: var(--accent-gold);
    color: var(--charcoal);
    font-weight: 600;
    border: 2px solid var(--accent-gold);
    transition: var(--transition);
}

.book-link:hover {
    background: transparent;
    color: var(--accent-gold);
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    color: var(--cream);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.book-description {
    color: var(--text-light);
    opacity: 0.8;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ============================================
   Submissions Section
   ============================================ */

.submissions {
    padding: 6rem 0;
    background: var(--gunmetal);
    position: relative;
}

.submissions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.submissions-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.submissions-text {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    opacity: 0.9;
}

.submissions-email {
    margin-top: 2rem;
    font-size: 1.125rem;
}

.submissions-email a {
    color: var(--accent-gold);
    font-weight: 600;
}

/* ============================================
   Contact Section
   ============================================ */

.contact {
    padding: 6rem 0;
    background: var(--charcoal);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    text-align: left;
}

.contact-text {
    margin-bottom: 2rem;
    color: var(--text-light);
    opacity: 0.9;
}

.contact-email {
    margin-bottom: 2rem;
}

.contact-email a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    transition: var(--transition);
    border-radius: 4px;
}

.social-link:hover {
    background: var(--accent-gold);
    color: var(--charcoal);
    transform: translateY(-3px);
}

.newsletter {
    background: var(--gunmetal);
    padding: 2rem;
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.newsletter-title {
    color: var(--cream);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input {
    padding: 0.875rem 1rem;
    background: var(--charcoal);
    border: 2px solid rgba(201, 169, 97, 0.3);
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.newsletter-input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

.newsletter-button {
    padding: 0.875rem 1.5rem;
    background: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    color: var(--charcoal);
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.newsletter-button:hover {
    background: transparent;
    color: var(--accent-gold);
}

.newsletter-message {
    margin-top: 1rem;
    color: var(--accent-gold);
    font-size: 0.875rem;
    min-height: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 3rem 0;
    background: var(--gunmetal);
    border-top: 1px solid rgba(201, 169, 97, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-text {
    color: var(--text-light);
    opacity: 0.7;
}

.footer-tagline {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--accent-gold);
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-link {
    color: var(--text-light);
    opacity: 0.7;
    transition: var(--transition);
}

.footer-link:hover {
    opacity: 1;
    color: var(--accent-gold);
}

.footer-separator {
    color: var(--text-light);
    opacity: 0.5;
}

/* ============================================
   Reading Progress Indicator
   ============================================ */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gold);
    z-index: 1001;
    transform-origin: left;
    width: 0%;
    transition: width 0.1s ease;
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(13, 13, 13, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 2rem 0;
        border-top: 1px solid rgba(201, 169, 97, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .container {
        padding: 0 1.5rem;
    }

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

    .about,
    .catalog,
    .submissions,
    .contact {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .container {
        padding: 0 1rem;
    }
}

/* ============================================
   Accessibility
   ============================================ */

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

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-gold);
    color: var(--charcoal);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

