html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    color: #2c1810;
    background: #e8e0d0;
}

.book-container {
    background: linear-gradient(to bottom, #d4c5aa, #c4b59a);
    padding: 0;
    min-height: 100vh;
}

.book-edge {
    height: 6px;
    background: linear-gradient(to bottom, #d4c5aa, #c9bca0);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.book-page {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: #f5f0e8;
    padding: 4rem 2.5rem;
    box-shadow:
        -8px 0 16px -8px rgba(0,0,0,0.12),
        8px 2px 16px -4px rgba(0,0,0,0.08),
        inset 6px 0 8px -6px rgba(0,0,0,0.06);
}

@media (min-width: 768px) {
    .book-page {
        padding: 4.5rem 4rem;
    }
}

@media (min-width: 1024px) {
    .book-page {
        padding: 5rem 5rem;
    }
}

.book-page::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 400px 400px;
}

.book-page::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(225deg, transparent 40%, rgba(0,0,0,0.035) 50%, rgba(0,0,0,0.05) 55%, transparent 55%);
    pointer-events: none;
}

.book-page.page-visible {
    animation: pageFadeIn 0.6s ease-out both;
}

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

.ornamental-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #c4b59a;
    font-size: 0.75rem;
    margin: 2.5rem 0;
}

.ornamental-rule::before,
.ornamental-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #c4b59a, transparent);
}

.drop-cap::first-letter {
    font-family: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-size: 3.5em;
    font-weight: 700;
    float: left;
    line-height: 0.85;
    padding-right: 0.5rem;
    padding-top: 0.15rem;
    color: #4338ca;
}

.page-number {
    font-family: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-size: 0.75rem;
    color: #a09580;
    text-align: center;
    margin-top: 3rem;
    font-style: italic;
    letter-spacing: 0.15em;
}

.chapter-title {
    font-family: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-weight: 700;
    color: #2c1810;
    text-align: center;
}

.chapter-number {
    font-family: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #4338ca;
    display: block;
    margin-bottom: 0.5rem;
}

.cover-section {
    background: linear-gradient(135deg, #070341 0%, #070341 40%, #070341 100%);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: stretch;
}

.cover-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 400px 400px;
    pointer-events: none;
}

.cover-body {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.cover-rule {
    width: 80px;
    height: 2px;
    background: rgba(255,255,255,0.4);
    margin: 1.5rem auto;
}

.field__error {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
    font-family: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
}

.field--error input,
.field--error textarea {
    border-color: #dc2626;
}

.notification {
    position: fixed;
    top: 4rem;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0;
    font-family: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    white-space: nowrap;
}

.notification--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification--success {
    background: #065f46;
    color: #fff;
}

.notification--error {
    background: #991b1b;
    color: #fff;
}

.notification__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification__message {
    flex: 1;
    font-size: 0.9rem;
}

.notification__close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.notification__close:hover {
    opacity: 1;
}

.pullquote-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    position: relative;
    overflow: hidden;
}

.pullquote-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 400px 400px;
    pointer-events: none;
}
