/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --background-color: #ffffff;
    --background-alt: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Crimson Text', Georgia, serif;
    
    /* Spacing */
    --header-height: 4rem;
    --section-padding: 4rem 0;
    --container-padding: 1rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary-dark);
}

/* ===== LAYOUT UTILITIES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding);
}

.section__title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-color);
}

/* ===== BUTTONS ===== */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

.button--primary {
    background-color: var(--primary-color);
    color: white;
}

.button--primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.button--secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.button--secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.nav__brand {
    display: flex;
    flex-direction: column;
}

.nav__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0;
}

.nav__tagline {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin: 0;
}

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

.nav__link {
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.nav__close {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: calc(var(--header-height) + 2rem);
    background: linear-gradient(135deg, var(--background-alt) 0%, var(--background-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero__container {
    width: 100%;
}

.hero__content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero__title-accent {
    color: var(--primary-color);
    font-style: italic;
}

.hero__description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ===== ABOUT SECTION ===== */
.about {
    background-color: var(--background-color);
}

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

.about__description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===== BOOKS SECTION ===== */
.books {
    background-color: var(--background-alt);
}

.books__content {
    max-width: 1000px;
    margin: 0 auto;
}

.book {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.book__cover {
    position: relative;
}

.book__cover-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
}

.book__cover-text {
    font-size: 1.125rem;
    line-height: 1.3;
}

.book__title {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.book__subtitle {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}

.book__description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.book__details {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.book__genre,
.book__length,
.book__representation {
    background-color: var(--background-alt);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

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

/* ===== NEWSLETTER SECTION ===== */
.newsletter {
    background-color: var(--primary-color);
    color: white;
}

.newsletter__content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter__title {
    color: white;
    margin-bottom: 1rem;
}

.newsletter__description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter__form {
    margin-bottom: 1rem;
}

.newsletter__input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.newsletter__input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: white;
    color: var(--text-color);
}

.newsletter__input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter__disclaimer {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background-color: var(--background-color);
}

.contact__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact__description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.contact__method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--background-alt);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.contact__method:hover {
    background-color: var(--border-color);
}

.contact__method-icon {
    font-size: 1.25rem;
}

.contact__method-text {
    font-weight: 500;
    color: var(--text-color);
}

/* ===== FORMS ===== */
.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
    background-color: var(--background-color);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    display: none;
}

.form__message--success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form__message--error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.form__message--info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer__content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer__title {
    color: white;
    margin-bottom: 0.5rem;
}

.footer__tagline {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

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

.footer__section-title {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer__list {
    list-style: none;
}

.footer__list li {
    margin-bottom: 0.5rem;
}

.footer__link {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer__link:hover {
    color: white;
}

.footer__bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
}

.footer__copyright {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer__disclaimer {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media screen and (max-width: 768px) {
    :root {
        --section-padding: 3rem 0;
        --container-padding: 1.5rem;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--background-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav__menu.show {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        gap: 2rem;
    }
    
    .nav__toggle {
        display: block;
    }
    
    .nav__close {
        display: block;
        position: absolute;
        top: 2rem;
        right: 2rem;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }
    
    .hero__description {
        font-size: 1.125rem;
    }
    
    .hero__buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .book {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .book__cover {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .contact__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .newsletter__input-group {
        flex-direction: column;
    }
    
    .newsletter__input {
        min-width: auto;
    }
    
    .footer__content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer__links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    :root {
        --section-padding: 2rem 0;
        --container-padding: 1rem;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .book {
        padding: 1.5rem;
    }
    
    .book__details {
        justify-content: center;
    }
    
    .book__buttons {
        justify-content: center;
    }
    
    .contact__method {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
.button:focus,
.nav__link:focus,
.form__input:focus,
.form__textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-light: #000000;
        --text-muted: #333333;
    }
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}