/* ═══════════════════════════════════════════════════════
   SHARED BASE STYLESHEET
   Foundation, Fonts, Layout Frame, Lace Header & Footer
   ═══════════════════════════════════════════════════════ */

/* ── Fonts ── */
@font-face {
    font-family: 'Old London';
    src: url('../fonts/OldLondon.ttf') format('truetype');
}

@font-face {
    font-family: 'Elementary_Gothic_Scaled';
    src: url('../fonts/Elementary_Gothic_Scaled.otf') format('truetype');
}

@font-face {
    font-family: 'Orwell';
    src: url('../fonts/Orwell.ttf') format('truetype');
}

/* ── Reset & Global Variables ── */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --obsidian: #0a0008;
    --nightshade-bright: #ffffff;
    --bone: #ffffff;
    --bone-dim: #d5d5d5;
    --ash: #6b5b6e;
    --border-accent: #3d1240;
    --gothic-purple: #630063;
    --gothic-red: #ff0000;
}

body {
    margin: 0;
    font-family: 'Elementary_Gothic_Scaled', sans-serif;
    background-image: url('../images/decorative/Stars_Black.gif');
    background-size: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--bone);
}

/* ── Selection ── */
::selection {
    background-color: var(--nightshade-bright);
    color: var(--obsidian);
}

/* ── Main Site Header ── */
header {
    padding: 12px 20px 5px;
    text-align: center;
}

header h1 {
    font-family: 'Old London', serif;
    color: var(--gothic-purple);
    margin: 0;
    font-size: 4em;
}

/* ── Global Links ── */
a {
    color: var(--gothic-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:visited {
    color: darkred;
}

a:hover {
    text-decoration: underline;
}

/* ── Shared Layout Container ── */
.container {
    display: flex;
    gap: 2%;
    width: min(92%, 1220px);
    margin: 0 auto;
}

.fixed {
    background-color: rgba(8, 8, 8, 0.7);
    width: 100%;
    overflow: hidden;
    padding: 2%;
    border-style: double;
    border-top: medium groove;
}

/* ── Shared Diary Page Frame ── */
.diary-page {
    margin: 0 auto;
    max-width: 1100px;
    min-height: 800px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--obsidian);
    border: 1.5px solid var(--border-accent);
}

.fixed.diary-page {
    background-color: rgba(8, 8, 8, 0.7);
    border-top: medium groove;
    padding: 0;
    width: 100%;
}

/* ── Shared Typography ── */
h2 {
    font-family: 'Elementary_Gothic_Scaled', serif;
    color: #9e9e9e;
}

p {
    font-size: 1.5em;
    font-family: 'Orwell', sans-serif;
    color: var(--bone);
}

/* ── Lace Header & Footer ── */
.diary-header {
    height: 60px;
    margin-bottom: 10px;
    position: relative;
    border: solid transparent;
    border-width: 0 0 20px 0;
    text-align: center;
    background-color: rgba(20, 0, 20, 0.6);
    color: var(--bone);
    border-image: 150 repeat url('../images/decorative/lace.PNG');
    border-image-outset: 15px 0 15px 0;
}

.diary-header h2 {
    margin: 12px 0 0 0;
    padding: 0;
    width: 100%;
    position: absolute;
    bottom: -5px;
    border: none;
    font-family: 'Old London', serif;
    font-size: 2em;
    color: var(--bone);
    text-shadow: 0 0 8px #000000, 0 0 20px rgba(139, 0, 0, 0.3);
    letter-spacing: 3px;
    background: none;
}

.diary-footer {
    margin: 0;
    padding: 12px 0 18px;
    font-weight: bold;
    text-align: center;
    border: solid transparent;
    border-width: 20px 0 0;
    background-color: rgba(20, 0, 20, 0.6);
    color: var(--bone-dim);
    border-image: 150 repeat url('../images/decorative/lace.PNG');
    border-image-outset: 0;
    font-family: 'Orwell', sans-serif;
    font-size: 0.8em;
    margin-top: auto;
}

/* ── Fixed Bottom Decorative Images ── */
#bottom-left-image,
#bottom-right-image {
    position: fixed;
    bottom: 0;
    height: auto;
    margin: 10px;
    z-index: -1;
    pointer-events: none;
}

#bottom-left-image {
    left: 0;
    width: 20%;
    max-width: 30vw;
}

#bottom-right-image {
    right: 0;
    width: 20%;
}
