/* --- Styles for the Introduction Page --- */

:root {
    --heading-font: 'Cinzel', serif;
    --body-font: 'Merriweather', serif;
}

body {
    background-image: url('../images/fireplace-background.gif');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--text-color);
}

/* Identical fade effect from the welcome page */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-color: var(--bg-color);
    opacity: 0.85;
    transition: background-color 0.3s ease;
}

main {
    transition: margin-left 0.3s ease;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0; /* Add some vertical padding */
    box-sizing: border-box;
}

main.shifted {
    margin-left: 250px;
}

/* The floating, scrollable content area */
.content-wrapper {
    max-width: 800px;
    max-height: 85vh; /* Limit height to 85% of the viewport */
    overflow-y: auto; /* Enable scrolling if content exceeds height */
    padding: 1rem 3rem;
    text-align: center;
    text-shadow: 0 2px 8px var(--bg-color); /* Shadow for readability */
}

/* Custom scrollbar to match the theme */
.content-wrapper::-webkit-scrollbar {
    width: 8px;
}
.content-wrapper::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
.content-wrapper::-webkit-scrollbar-thumb {
    background: var(--text-color);
    border-radius: 4px;
    opacity: 0.7;
}

h1 {
    font-family: var(--heading-font);
    font-size: 2.8em;
    font-weight: 700;
}

.prologue {
    font-family: var(--body-font);
    font-style: italic;
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 60ch; /* Limit line length for readability */
    margin-left: auto;
    margin-right: auto;
}

.divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, var(--text-color), transparent);
    opacity: 0.5;
    margin: 3rem auto;
}

/* --- Section Styling & Fade-in Animation --- */
.intro-section {
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.intro-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.intro-section h2 {
    font-family: var(--heading-font);
    font-size: 1.8em;
    font-weight: 400;
    margin-bottom: 1rem;
    display: inline-flex; /* Keep icon and text together */
    align-items: center;
}

.intro-section h2 .material-symbols-outlined {
    margin-right: 0.75rem;
    font-size: 1.2em;
    opacity: 0.8;
}

.intro-section p {
    font-family: var(--body-font);
    font-size: 1em;
    line-height: 1.7;
    text-align: justify; /* Justified text for a book-like feel */
}

/* --- Button styled like the welcome page's button --- */
.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 12px 35px;
    font-family: var(--heading-font);
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
    background: transparent;
    border: 2px solid var(--text-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--text-color);
}
