/* 
 * AetherForge: Elite Print Aesthetic 
 * Strategy: Restrained (Tinted neutrals, no true black/white)
 * Layout: Physical page margins
 */
:root {
    --paper-bg: #F6F5F2; /* Warm off-white */
    --ink-dark: #1C1C1A; /* Warm black */
    --ink-light: #6E6D69; /* Warm grey for descriptions */
    --hairline: #E2E0D8; /* Divider color */
    
    --font-display: 'Instrument Serif', serif;
    --font-ui: 'Inter', sans-serif;
    
    --page-margin: 2rem;
}

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

body {
    background-color: var(--paper-bg);
    color: var(--ink-dark);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden; /* Prevent scrolling, acts like a fixed book page */
}

/* The physical bounds of the "book" */
#book-frame {
    width: 100%;
    max-width: 480px; /* Mobile bounds */
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--paper-bg);
}

#page-container {
    flex: 1;
    padding: var(--page-margin);
    overflow-y: auto; /* Allow scrolling if page content is too long */
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.15s ease-out; /* Simple, non-fancy page flip */
}

#page-container.fading {
    opacity: 0;
}

/* Page Types */
.page-cover {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-bottom: 2rem;
}

.cover-image-wrapper {
    width: 100%;
    aspect-ratio: 4/5;
    margin-bottom: 2rem;
    overflow: hidden;
    background-color: var(--hairline);
}

.cover-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2) contrast(1.1); /* Editorial tint */
}

.cover-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cover-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-light);
}

.page-category {
    padding-top: 1rem;
}

.category-header {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.01em;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.menu-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.item-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.01em;
}

.item-dots {
    flex: 1;
    border-bottom: 1px dotted var(--hairline);
    position: relative;
    top: -6px;
    opacity: 0.5;
}

.item-price {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
}

.item-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ink-light);
    max-width: 90%;
}

.page-backcover {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.backcover-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.backcover-text {
    font-size: 0.75rem;
    color: var(--ink-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Pagination Footer */
.book-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--page-margin);
    border-top: 1px solid var(--hairline);
    background: var(--paper-bg);
}

.page-btn {
    background: none;
    border: none;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.2s ease;
}

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

.page-numbers {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--ink-light);
    font-style: italic;
}