/*
 * site.css
 */

/* ============================================================
   Root variables (GrailHeart palette)
   ============================================================ */

:root {
    --blood-red: #931a33;
    --gold: #e4c000;
    --menu-blue: #1e2c3c;
    --bg-white: #faf8ed;

    --text-main: #000;
    --text-muted: #444;
}

/* ============================================================
   Reset / Base
   ============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Caudex, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.4;
    background: #fff; /* browser background */
    color: var(--text-main); /* maximum contrast */
}

.sneakpeek {
    font-size: 16px;
}

input[type="checkbox"] {
    accent-color: #888;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}

@media (max-width: 768px) {

    .nav-toggle {
        display: block;
        color: var(--menu-blue);
    }

    .site-nav {
        display: none;
        flex-direction: column;
        gap: 0.25rem;
        margin-top: 0;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 0.25rem 0;
    }
}


/* ============================================================
   Canvas (the world)
   ============================================================ */

.canvas {
    max-width: 1000px;
    min-height: max(1200px, 100vh);
    margin: 0 auto;
    background: var(--bg-white);
}

/* ============================================================
   Menu bar
   ============================================================ */

.menu-bar {
    background-color: #1f3a5f; /* ← restore your blue (adjust as needed) */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.menu-inner {
    display: flex;
    align-items: center; /* keeps nav vertically centered */
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
}

.site-title {
    display: flex;
    flex-direction: column; /* stack title + motto */
    line-height: 1.1;
}

.site-title a {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
}

.site-motto {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.75;
    white-space: nowrap;
    color: #fff;
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-nav a {
    margin-left: 1.25rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
}

.site-nav a:hover {
    color: var(--gold);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Alternate hero proportions if needed */
.hero-page {
    aspect-ratio: 16 / 10;
}

/* ============================================================
   Content (reading column)
   ============================================================ */

.content {
    max-width: 48rem;
    margin: 2rem auto;
    padding: 0;
}

@media (max-width: 600px) {
    .content {
        padding: 0 1.25rem;
    }
}

.article-nav {
    display: flex;
    align-items: center;     /* vertical */
    justify-content: center; /* horizontal */
    /*display: grid;*/
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 40rem;
    margin: 2rem auto;
    font-size: 0.9em;
}

.article-nav a {
    color: #000;
    text-decoration: none;
}

.article-nav a:hover {
    text-decoration: underline;
}

.nav-prev {
    text-align: right;
    padding-right: 1rem;
}

.nav-next {
    text-align: left;
    padding-left: 1rem;
}

.nav-emblem img {
    width: 60px; /* ← resize here */
    height: auto;
    transition: transform 0.35s ease, filter 0.35s ease;
    transform-origin: 50% 50%;
}

.nav-emblem a:hover img {
    transform: scale(1.08);
    filter: brightness(1.10);
}

.nav-arrow {
    font-size: 1.35em;        /* larger than text, but not cartoonish */
    line-height: 1;
    color: var(--blood-red);
    margin: 0 0.25em;
    position: relative;
    top: 0.05em;              /* optical alignment tweak */
    user-select: none;
}


.site-footer {
    padding: 0.5rem 0 2rem;
    text-align: center;
    color: #999;
}

.site-footer .copyright {
    font-size: 0.85em;
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

h1 {
    font-size: 2.2rem;
    margin-top: 0;
}

h2 {
    margin-top: 2.5rem;
}

p {
    margin: 1.2rem 0;
}

em, i {
    font-style: italic;
}

/* ============================================================
   Links
   ============================================================ */

a {
    color: var(--blood-red);
}

a:hover {
    color: var(--gold);
}

/*.dropcap {*/
/*    float:left;*/
/*    color: var(--blood-red);*/
/*    font-size: 60px;*/
/*    line-height: 60px;*/
/*    padding-top: 1px;*/
/*    padding-right: 4px;*/
/*}*/

.dropcap {
    float: left;
    margin: 0.1em 0.4em 0 0;
    line-height: 1;
}

.dropcap img {
    height: 4.1em; /* single authoritative size */
    width: auto;
    display: block;
}

.donate-button {
    display: inline-block;
    margin: 1.5rem 0;
    padding: 0.7rem 1.2rem;
    background: var(--menu-blue);
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 1rem;
}

.donate-button:hover {
    background: var(--gold);
}

.donate-note {
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* TEXTSEP */
.textsep {
    text-align: center;
    margin: 2.5rem 0;
}

.textsep img {
    max-height: 100px;
    width: auto;
    opacity: 0.9;
}

/*.textsep img {*/
/*    max-height: 100px;*/
/*    width: auto;*/
/*    opacity: 0.85;*/
/*    filter: saturate(0.9);*/
/*}*/

@media (max-width: 600px) {
    .textsep img {
        max-height: 70px;
    }
}

/* gh-image */
figure.gh-image {
    text-align: center;
    margin: 0.1em auto;
}

figure.gh-image img {
    display: inline-block;
}

figure.gh-image figcaption {
    margin-top: 0.0em;
    font-size: 0.8em;
    font-style: italic;
    color: #444;
}

/* ============================================================
   Mobile hamburger nav (authoritative override)
   ============================================================ */

@media (max-width: 768px) {

    .menu-bar {
        position: relative;
    }

    .nav-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.8rem;
        color: #fff;
        cursor: pointer;
        margin-left: auto;
    }

    .site-nav {
        display: none !important;
        position: absolute;
        top: 100%;
        right: 0;
        background: #1f3a5f;
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
        z-index: 1000;
        min-width: 160px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }

    .site-nav.is-open {
        display: flex !important;
    }

    .site-nav a {
        margin: 0;
        color: #fff;
        white-space: nowrap;
    }

    .site-nav a:hover {
        color: var(--gold);
    }
}

.yt-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 2rem 0;
}

.yt-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.audio-embed {
    margin: 2rem 0;
}

.audio-embed audio {
    width: 100%;
    max-width: 100%;
    height: 40px;
}

 .toc-controls {
     margin-bottom: 1.5rem;
     display: flex;
     gap: 1.5rem;
     align-items: center;
 }

.toc {
    list-style: none;
    padding-left: 0;
    min-height: 31rem;
}

.toc-item {
    margin-bottom: 1.2rem;
}

.toc-item a {
    font-weight: 600;
    text-decoration: none;
}

.toc-blurb {
    /*display: none;*/
    margin-top: 0.3rem;
    margin-left: 1rem;
    max-width: 40rem;
}

/*.toc-wrapper.show-blurbs .toc-blurb {*/
/*    display: block;*/
/*}*/

.story-nav {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    font-size: 1.1rem;
}

.story-nav a {
    text-decoration: none;
}

.story-nav .disabled {
    opacity: 0.4;
}

.story-nav .nav-compass {
    height: 42px;
}

.story-nav .first,
.story-nav .last {
    font-size: 0.95em;
}


.search-wrap {
    position: relative;
}

.search-clear {
    position: absolute;
    right: 0.10rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
}

.search-clear:hover {
    opacity: 1;
}

#searchInput:placeholder-shown + .search-clear {
    display: none;
}

.search-submit {
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.03em;

    padding: 0.15rem 0.25rem;
    margin-left: 0.0rem;

    background: #f3f1ec;
    color: #333;

    border: 1px solid #aaa;
    border-radius: 3px;

    cursor: pointer;
}

.search-submit:hover {
    background: #ebe8e1;
    border-color: #777;
}

.search-submit:active {
    background: #e2ded6;
}

 .gh-share {
     /*margin: 3rem auto 2rem;*/
     /*text-align: center;*/
     font-size: 0.95rem;
 }

.gh-share-intro {
    margin-bottom: 0.75rem;
    color: #555;
    font-style: italic;
}

.gh-share-toggle {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background: var(--menu-blue);
    color: #fff;

    border: 1px solid var(--menu-blue);
    padding: 0.45rem 1.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;

    cursor: pointer;
}

.gh-share-toggle:hover {
    border-color: #777;
}

.gh-share-panel {
    /*margin-top: 2rem;*/
    /*padding: 1.5rem;*/
    /*background: #f7f5f1;*/
    /*border-top: 1px solid #ddd;*/
}

.gh-share-framing {
    margin-bottom: 1rem;
    color: #444;
}

.gh-share-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;        /* tighter vertical spacing */
    margin-top: 0.5rem;
}

.gh-share-options p {
    margin: 0;
    padding-left: 3em;  /* ← the indent */
    display: flex;
    align-items: center;
    gap: 0.6rem;        /* space between button and text */
}

.gh-share-btn {
    width:13em;              /* adjust to taste */
    text-align: center;

    background: var(--menu-blue);
    color: #fff;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.gh-share-btn:hover {
    border-color: #666;
}

.gh-share-feedback {
    font-size: 0.75rem;
    color: #555;
    margin-left: 0.4rem;
}

.product-offering img {
    float: left;
    margin: 0 1rem 0.5rem 0; /* right & bottom breathing room */
}

.product-offering::after {
    content: "";
    display: block;
    clear: both;
}

.footer-content {
    margin-left: 1.5em;
}

.site-divider {
    border: none;
    border-top: 2px solid #999;
    width: 66%;
    margin: 3rem auto 2rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lang-menu {
    position: relative;
}

.lang-menu summary {
    list-style: none;
    cursor: pointer;
}

.lang-menu summary::-webkit-details-marker {
    display: none;
}

.lang-menu summary::after {
    content: " ▾";
    font-size: 0.8em;
}

/* dropdown */
.lang-list {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1e3556;     /* match your menu bar */
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 9rem;
    display: none;
    z-index: 1000;
}

/* show when open */
.lang-menu[open] .lang-list {
    display: block;
}

/* vertical list */
.lang-list a {
    display: block;
    padding: 0.4rem 0.7rem;
    white-space: nowrap;
    color: white;
    text-decoration: none;
}

.lang-list a:hover {
    background: rgba(255,255,255,0.1);
}

.site-nav summary {
    color: white;              /* match menu links */
    cursor: pointer;
    text-decoration: none;
    font-weight: normal;
}

.site-nav details {
    margin-left: 1.25rem;          /* same spacing as links */
}

.site-nav summary {
    color: #fff;                   /* same color */
    font-size: 0.95rem;            /* same size */
    font-family: inherit;          /* same typeface */
    cursor: pointer;
    text-decoration: none;
}

.site-nav summary:hover {
    color: var(--gold);            /* same hover effect */
}

.lang-consent {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: #1e2c3c;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    z-index: 9999;
}

.lang-consent.hidden {
    display: none;
}
