/* ============================================================
   archive-shared.css
   Shared stylesheet for all Aethereal Stories Archive pages.
   Link with the correct relative path to site root.
   e.g. from Archive/Locations/Book of Thoth Saga/:
        <link href="../../../archive-shared.css" rel="stylesheet">
   ============================================================ */
/* ── RESET ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: black;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 18px;
    color: #F1E5AC;
}

/* ── PARALLAX BACKGROUND ──
   background-image must be set inline per page with the correct relative path.
   e.g. style="background-image: url('../../../Assets/Images/Backgrounds/BG Home v2.jpg')" */
.parallax-bg {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -10;
    background-size: cover;
    background-position: center 0px;
    background-repeat: repeat;
}

.container {
    position: relative;
    z-index: 1;
    min-height: 145vh;
}

/* ── HEADER ── */
.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 1vw;
    padding-right: 2vw;
    gap: 2vw;
    box-sizing: border-box;
    overflow: hidden;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 1.5vw;
    height: 100%;
    flex-shrink: 1;
    min-width: 0;
}

.logo-icon {
    height: 90%;
    min-height: 40px;
    width: auto;
}

.wordmark {
    height: 40%;
    width: auto;
    max-width: 100%;
    min-height: 50%;
    object-fit: contain;
}

.cinzel-menu {
    display: flex;
    align-items: center;
    gap: 0.6vw;
    flex-shrink: 0;
}

.cinzel-menu a,
.menu-pipe {
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 0.8vw, 16px);
    letter-spacing: 0.2vw;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cinzel-menu a {
    color: #F1E5AC;
}

.cinzel-menu a:hover {
    color: #FFD700;
    text-shadow: 0px 0px 8px rgba(255,215,0,0.4);
}

.menu-pipe {
    color: rgba(241,229,172,0.5);
    user-select: none;
}

.cinzel-menu a.shop-btn {
    border: 0.1vw solid #F1E5AC;
    padding: 0.4vw 1vw;
}

.cinzel-menu a.shop-btn:hover {
    border-color: #FFD700;
}

@media (max-width: 1500px) {
    .header-overlay {
        position: relative;
        flex-direction: column;
        justify-content: center;
        padding: 6vw 5vw;
        gap: 3vw;
        height: auto;
    }

    .header-logos {
        height: auto;
        justify-content: center;
        align-items: center;
        gap: 3vw;
        width: 100%;
        flex-wrap: wrap;
    }

    .logo-icon {
        height: 15vw;
        min-height: 60px;
        max-height: 80px;
    }

    .wordmark {
        height: 8vw;
        max-height: 60px;
        max-width: 85%;
        object-fit: contain;
    }

    .cinzel-menu {
        height: auto;
        justify-content: center;
        flex-wrap: wrap;
        gap: 2vw;
    }

    .cinzel-menu a,
    .menu-pipe {
        font-size: clamp(12px, 2.2vw, 16px);
    }
}

/* ── FOOTER ──
   background-image set inline per page with correct relative path. */
.main-footer {
    position: relative;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-top: 1px solid #F1E5AC;
    box-shadow: 0px -4px 15px rgba(241,229,172,0.2);
    font-family: 'Cinzel', serif;
    padding: 4vw 5vw 1.5vw 5vw;
    box-sizing: border-box;
    z-index: 10;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3vw;
    margin-bottom: 3vw;
}

.footer-col {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.footer-col h4 {
    color: #F1E5AC;
    font-size: clamp(14px, 1.2vw, 20px);
    letter-spacing: 0.2vw;
    text-transform: uppercase;
    margin: 0 0 1.5vw 0;
    border-bottom: 1px solid rgba(241,229,172,0.3);
    padding-bottom: 0.5vw;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1vw;
}

.footer-col a {
    color: rgba(241,229,172,0.7);
    text-decoration: none;
    font-size: clamp(12px, 0.8vw, 16px);
    letter-spacing: 0.1vw;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.footer-col a:hover {
    color: #FFD700;
    text-shadow: 0px 0px 8px rgba(255,215,0,0.4);
}

/* ── INLINE ICON ── */
.inline-icon {
    height: 1.1em;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
    margin-bottom: 2px;
    transition: transform 0.3s ease;
}

.footer-col a:hover .inline-icon {
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(241,229,172,0.2);
    padding-top: 1.5vw;
}

.footer-bottom p {
    color: rgba(241,229,172,0.5);
    font-size: clamp(10px, 0.6vw, 14px);
    letter-spacing: 0.2vw;
    margin: 0;
    text-transform: uppercase;
}

@media (max-width: 1000px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .footer-col h4 {
        border-bottom: none;
        margin-bottom: 15px;
    }

    .footer-col ul {
        gap: 15px;
    }

    .main-footer {
        padding-top: 40px;
    }
}

/* ── BREADCRUMB ── */
.breadcrumb-bar {
    width: 80%;
    max-width: none;
    margin: 0 auto;
    padding: 20px 0 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 0.75vw, 13px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(241,229,172,0.5);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-bar a {
    color: rgba(241,229,172,0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-bar a:hover {
    color: #FFD700;
}

.breadcrumb-bar .sep {
    color: rgba(241,229,172,0.3);
}

.breadcrumb-bar .current {
    color: #F1E5AC;
}

/* ── WIKI LINKS ── */
a.wl {
    color: #a8c8e8;
    text-decoration: none;
    border-bottom: 1px solid rgba(168,200,232,0.3);
    transition: color 0.2s, border-color 0.2s;
}

a.wl:hover {
    color: #cde4f8;
    border-bottom-color: rgba(168,200,232,0.7);
}

a.stub {
    color: #c8a84a;
    text-decoration: none;
    border-bottom: 1px dashed rgba(200,168,74,0.4);
    transition: color 0.2s;
}

a.stub:hover {
    color: #FFD700;
    border-bottom-color: rgba(255,215,0,0.6);
}

/* ── DIVIDERS ── */
.gold-rule {
    border: none;
    border-top: 1px solid #F1E5AC;
    margin: 24px 0;
    box-shadow: 0 0 8px rgba(241,229,172,0.2);
}

.thin-rule {
    border: none;
    border-top: 1px solid rgba(241,229,172,0.2);
    margin: 30px 0;
}

.divider-ornament {
    width: 60%;
    margin: 30px auto;
}

.divider-ornament .line {
    display: inline-block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #F1E5AC, transparent);
    position: relative;
}

.divider-ornament .line span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0,0,0,0.9);
    padding: 0 15px;
    color: #F1E5AC;
    font-size: 18px;
}

.char-hero {
    width: 90%;
    max-width: none;
    margin: 30px auto 0;
    padding: 0;
    display: grid;
    grid-template-columns: 25% 1fr;
    gap: 50px;
    align-items: start;
}

.loc-hero {
    width: 90%;
    max-width: none;
    margin: 30px auto 0;
    padding: 0;
    display: grid;
    grid-template-columns: 25% 1fr;
    gap: 50px;
    align-items: start;
}

.info-col {
    position: sticky;
    top: 20px;
}

.portrait-col {
    position: sticky;
    top: 20px;
}

/* ── PORTRAIT / IMAGE FRAME ── */
.portrait-frame,
.loc-image-frame {
    border: 2px solid #F1E5AC;
    box-shadow: 0px 0px 20px rgba(241,229,172,0.3);
    background: #0a0806;
    padding: 4px;
}

.portrait-frame img,
.loc-image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.loc-image-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(241,229,172,0.25);
    font-family: 'Cinzel', serif;
    font-size: clamp(10px, 0.7vw, 12px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    padding: 20px;
}

.loc-image-placeholder .icon {
    font-size: 32px;
    opacity: 0.3;
}

.loc-caption,
.portrait-caption {
    margin-top: 8px;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: clamp(10px, 0.7vw, 12px);
    letter-spacing: 0.12em;
    color: rgba(241,229,172,0.5);
    text-transform: uppercase;
}

/* ── INFOBOX ── */
.infobox {
    margin-top: 20px;
    border: 2px solid #F1E5AC;
    box-shadow: 0px 0px 20px rgba(241,229,172,0.2);
    background-color: rgba(0,0,0,0.7);
}

.infobox-header {
    background-color: rgba(241,229,172,0.12);
    border-bottom: 1px solid #F1E5AC;
    padding: 8px 14px;
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 0.75vw, 13px);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #FFD700;
    text-align: center;
}

.infobox table {
    width: 100%;
    border-collapse: collapse;
}

.infobox td {
    padding: 7px 14px;
    border-bottom: 1px solid rgba(241,229,172,0.1);
    vertical-align: top;
    line-height: 1.5;
}

.infobox td:first-child {
    font-family: 'Cinzel', serif;
    font-size: clamp(10px, 0.7vw, 12px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(241,229,172,0.6);
    white-space: nowrap;
    width: 38%;
}

.infobox td:last-child {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
    width: 58%;
}

.infobox tr:last-child td {
    border-bottom: none;
}

.status-active {
    color: #7aaf5a;
    font-style: italic;
}

/* ── PAGE TITLE ELEMENTS ── */
.loc-eyebrow,
.char-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 0.75vw, 13px);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(241,229,172,0.6);
    margin-bottom: 6px;
}

.loc-name,
.char-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(30px, 3.5vw, 50px);
    font-weight: 700;
    color: #F1E5AC;
    line-height: 1.1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.loc-tagline,
.char-epithet {
    font-family: 'Crimson Text', serif;
    font-style: italic;
    font-size: clamp(15px, 1.1vw, 18px);
    color: rgba(241,229,172,0.65);
    line-height: 1.6;
}

/* ── SECTION TITLE ── */
.section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(13px, 0.9vw, 16px);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #FFD700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(241,229,172,0.3);
}

/* ── BODY TEXT ── */
.body-text {
    font-family: 'Crimson Text', serif;
    font-size: clamp(16px, 1.1vw, 18px);
    color: #F1E5AC;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.body-text p + p {
    margin-top: 1em;
}

/* ── ARTICLE PANEL ── */
.article {
    width: 90%;
    max-width: none;
    margin: 40px auto 60px;
    padding: 0 40px 40px;
    background-color: rgba(0,0,0,0.7);
    border: 2px solid #F1E5AC;
    box-shadow: 0px 0px 30px rgba(241,229,172,0.2);
}

.article-inner {
    padding-top: 40px;
}

/* ── PULL QUOTE ── */
.pull-quote {
    border-left: 3px solid rgba(241,229,172,0.5);
    padding: 12px 24px;
    margin: 24px 0;
    background-color: rgba(241,229,172,0.05);
    font-style: italic;
    font-size: clamp(16px, 1.1vw, 18px);
    color: #F1E5AC;
    line-height: 1.7;
    font-family: 'Crimson Text', serif;
}

.pull-quote cite {
    display: block;
    margin-top: 8px;
    font-family: 'Cinzel', serif;
    font-size: clamp(10px, 0.7vw, 12px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(241,229,172,0.6);
    font-style: normal;
}

/* ── QUOTES LIST ── */
.quotes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.quotes-list li {
    border-left: 3px solid rgba(241,229,172,0.4);
    padding: 12px 24px;
    background-color: rgba(241,229,172,0.04);
}

.quotes-list li p {
    font-style: italic;
    font-size: clamp(16px, 1.1vw, 18px);
    color: #F1E5AC;
    line-height: 1.7;
    margin: 0;
    font-family: 'Crimson Text', serif;
}

.quotes-list li cite {
    display: block;
    margin-top: 8px;
    font-family: 'Cinzel', serif;
    font-size: clamp(10px, 0.7vw, 12px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(241,229,172,0.6);
    font-style: normal;
}

/* ── LOCATION / ABILITY / RELATIONSHIP ENTRIES ── */
.location-entry,
.ability-entry,
.relationship-entry {
    margin-bottom: 28px;
    padding-left: 20px;
    border-left: 2px solid rgba(241,229,172,0.25);
}

.location-entry h4,
.ability-entry h4 {
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 0.8vw, 14px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FFD700;
    margin-bottom: 6px;
}

.relationship-entry h4 {
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 0.8vw, 14px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #F1E5AC;
    margin-bottom: 6px;
}

.location-entry p,
.ability-entry p,
.relationship-entry p {
    font-family: 'Crimson Text', serif;
    font-size: clamp(16px, 1.1vw, 18px);
    color: #F1E5AC;
    line-height: 1.75;
    margin: 0;
}

/* ── APPEARANCES TABLE ── */
.appearances-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Crimson Text', serif;
    font-size: clamp(15px, 1vw, 17px);
}

.appearances-table th {
    font-family: 'Cinzel', serif;
    font-size: clamp(10px, 0.7vw, 12px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(241,229,172,0.6);
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #F1E5AC;
    background-color: rgba(241,229,172,0.07);
}

.appearances-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(241,229,172,0.15);
    color: #F1E5AC;
    vertical-align: top;
    line-height: 1.6;
}

.appearances-table td:first-child {
    font-style: italic;
}

.appearances-table td:nth-child(2) {
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 0.75vw, 13px);
    letter-spacing: 0.06em;
    color: #FFD700;
}

.appearances-table tr:last-child td {
    border-bottom: none;
}

.series-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(241,229,172,0.55);
    font-style: normal;
}

/* ── TRIVIA LIST ── */
.trivia-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.trivia-list li {
    font-family: 'Crimson Text', serif;
    font-size: clamp(16px, 1.1vw, 18px);
    color: #F1E5AC;
    line-height: 1.75;
    padding-left: 20px;
    position: relative;
}

.trivia-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0.1em;
    font-size: 9px;
    color: rgba(241,229,172,0.5);
}

/* ── SOUNDTRACK BLOCK ── */
.soundtrack-block {
    padding: 24px 30px;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid rgba(241,229,172,0.4);
    box-shadow: 0px 0px 15px rgba(241,229,172,0.1);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.soundtrack-icon {
    font-size: 28px;
    color: rgba(241,229,172,0.5);
    flex-shrink: 0;
    margin-top: 2px;
}

.soundtrack-block h4 {
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 0.75vw, 13px);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(241,229,172,0.7);
    margin-bottom: 8px;
}

.soundtrack-block p {
    font-family: 'Crimson Text', serif;
    font-size: clamp(15px, 1vw, 17px);
    color: #F1E5AC;
    line-height: 1.7;
    margin: 0;
}

.track-title {
    font-style: italic;
    color: #FFD700;
}

audio {
    display: block;
    margin-top: 12px;
    width: 100%;
    max-width: 500px;
}

/* ── SPOILER TOGGLE ── */
.spoiler-toggle {
    margin-top: 16px;
    border: 1px solid rgba(180,50,50,0.6);
    background-color: rgba(120,20,20,0.15);
    padding: 14px 20px;
}

.spoiler-toggle summary {
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 0.75vw, 13px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(220,100,100,0.9);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spoiler-toggle summary::before {
    content: '⚠';
}

.spoiler-toggle summary::-webkit-details-marker {
    display: none;
}

.spoiler-content {
    margin-top: 12px;
    font-family: 'Crimson Text', serif;
    font-size: clamp(15px, 1vw, 17px);
    color: #F1E5AC;
    line-height: 1.75;
}

/* ── BOOK SUBHEADING ── */
.book-subheading {
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 0.8vw, 14px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #F1E5AC;
    margin: 4px 0 16px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .loc-hero,
    .char-hero {
        width: 95%;
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0;
    }

    .info-col,
    .portrait-col {
        position: static;
        max-width: 100%;
    }

    .loc-name,
    .char-name {
        font-size: 28px;
    }

    .article {
        width: 95%;
        margin: 20px auto 40px;
        padding: 0 20px 30px;
    }

    .article-inner {
        padding-top: 24px;
    }

    .breadcrumb-bar {
        width: 90%;
        padding: 16px 0 0;
    }

    .divider-ornament {
        width: 80%;
    }
}