/* =========================================================
   JOURNEY ARCHIVE LIVING BOOK
   ========================================================= */

.book-archive {
    --blue: #3d80ef;
    --red: #df2638;

    width: min(1480px, calc(100% - 28px));
    margin: 0 auto;
    padding: 30px 0 90px;

    color: #eef5ff;
}


/* =========================================================
   MAIN ARCHIVE HERO
   ========================================================= */

.book-hero {
    padding: clamp(32px, 6vw, 76px);

    border: 1px solid #293c58;
    border-radius: 26px;

    background:
        radial-gradient(
            circle at 88% 5%,
            rgba(48, 113, 255, .24),
            transparent 34%
        ),
        radial-gradient(
            circle at 8% 96%,
            rgba(225, 34, 54, .18),
            transparent 34%
        ),
        #070c13;
}

.book-hero > span {
    color: #72a6ff;

    font-size: .72rem;
    font-weight: 900;
    letter-spacing: 3px;
}

.book-hero h1 {
    margin: 10px 0;

    font-size: clamp(3rem, 7vw, 7rem);
    line-height: .9;
    letter-spacing: -.055em;
}

.book-hero h1 strong {
    display: block;

    color: #e32639;
}

.book-hero p {
    max-width: 850px;

    color: #b3c2d6;

    font-size: 1.08rem;
    line-height: 1.75;
}

.book-hero-stats {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
    margin-top: 25px;
}

.book-hero-stats b {
    padding: 8px 11px;

    border: 1px solid #35547d;
    border-radius: 999px;

    background: #0b1725;
    color: #aac6ec;

    font-size: .7rem;
}


/* =========================================================
   SEARCH / FILTER CONTROLS
   ========================================================= */

.book-controls {
    position: sticky;
    top: 8px;
    z-index: 10;

    margin: 18px 0 44px;
    padding: 15px;

    border: 1px solid #293d59;
    border-radius: 17px;

    background: rgba(7, 12, 20, .94);

    backdrop-filter: blur(15px);
}

.book-controls label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;

    gap: 12px;
}

.book-controls label span {
    color: #75a3e7;

    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.book-controls input {
    width: 100%;
    padding: 11px 13px;

    border: 1px solid #304763;
    border-radius: 9px;

    background: #060b12;
    color: #fff;
}

.book-filters,
.book-years {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;
    margin-top: 10px;
}

.book-filters button,
.book-years button {
    padding: 7px 10px;

    border: 1px solid #314966;
    border-radius: 999px;

    background: #0e1723;
    color: #a8bad1;

    font-weight: 900;

    cursor: pointer;
}

.book-filters button.is-active,
.book-years button.is-active {
    border-color: #4d86ed;

    background: #173c78;
    color: #fff;
}


/* =========================================================
   ARCHIVE TIMELINE
   ========================================================= */

.book-timeline {
    position: relative;

    display: grid;

    gap: 30px;
    padding-left: 170px;
}

.book-spine {
    position: absolute;

    left: 130px;
    top: 0;
    bottom: 0;

    width: 2px;

    background: linear-gradient(
        #3179ee,
        #dc263a
    );
}

.book-chapter-card {
    position: relative;

    max-width: 1040px;
}


/* =========================================================
   TIMELINE DATE NODE
   ========================================================= */

.book-date-node {
    position: absolute;

    left: -165px;
    top: 28px;

    width: 135px;

    text-align: right;
}

.book-date-node span {
    display: inline-block;

    padding: 7px 9px;

    border: 1px solid #3c628f;
    border-radius: 999px;

    background: #08121e;
    color: #d6e7ff;

    font-size: .7rem;
    font-weight: 900;
}

.book-date-node i {
    position: absolute;

    right: -17px;
    top: 11px;

    width: 14px;
    height: 14px;

    border: 4px solid #367ef0;
    border-radius: 50%;

    background: #05080d;
}


/* =========================================================
   CHAPTER CARD
   ========================================================= */

.book-chapter-open {
    display: grid;
    grid-template-columns: 230px 1fr;

    width: 100%;
    padding: 0;

    overflow: hidden;

    text-align: left;

    border: 1px solid #2b405e;
    border-radius: 17px;

    background: #09111a;
    color: inherit;

    cursor: pointer;

    transition:
        transform .18s,
        border-color .18s;
}

.book-chapter-open:hover {
    transform: translateY(-2px);

    border-color: #5689d6;
}


/* =========================================================
   CHAPTER CARD MEDIA
   ========================================================= */

.book-card-media {
    min-height: 220px;

    background: #05090f;
}

.book-card-media img {
    width: 100%;
    height: 100%;
    min-height: 220px;

    object-fit: cover;
}

.book-video-poster,
.book-type-poster {
    display: grid;
    place-items: center;

    height: 100%;
    min-height: 220px;

    background:
        radial-gradient(
            circle,
            rgba(50, 119, 236, .18),
            transparent 55%
        ),
        #060b12;
}

.book-video-poster span {
    font-size: 3rem;

    color: #e52a3d;
}

.book-video-poster small {
    align-self: start;

    color: #7ea9e9;

    font-weight: 900;
}

.book-card-media blockquote {
    display: grid;
    place-items: center;

    height: 100%;
    min-height: 220px;

    margin: 0;
    padding: 22px;

    color: #fff;

    font-weight: 900;
    line-height: 1.5;
}


/* =========================================================
   CHAPTER CARD COPY
   ========================================================= */

.book-card-copy {
    padding: 22px;
}

.book-card-copy > span {
    color: #72a2e8;

    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.book-card-copy h2 {
    margin: 7px 0 10px;

    font-size: clamp(1.8rem, 4vw, 3.3rem);
    line-height: 1;
}

.book-card-copy p {
    color: #aebed1;

    line-height: 1.65;
}

.book-card-counts {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;
    margin-top: 13px;
}

.book-card-counts b {
    padding: 5px 7px;

    border: 1px solid #2c4567;
    border-radius: 999px;

    color: #9db9dd;

    font-size: .65rem;
}

.book-enter-label {
    display: block;

    margin-top: 16px;

    color: #ff7a86;

    font-size: .72rem;
}

.book-no-results {
    padding: 60px;

    text-align: center;

    color: #9fb2ca;
}


/* =========================================================
   FULLSCREEN READER OVERLAY
   ========================================================= */

.book-reader-overlay {
    position: fixed;

    inset: 0;
    z-index: 99999;

    display: none;

    background: #04070b;
}

.book-reader-overlay.is-open {
    display: block;
}

.book-reader-overlay > #bookReaderMount {
    height: 100%;
}


/* =========================================================
   READER SHELL
   ========================================================= */

.reader-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);

    height: 100vh;

    color: #edf5ff;
    background: #05090f;
}


/* =========================================================
   READER SIDEBAR
   ========================================================= */

.reader-sidebar {
    display: flex;
    flex-direction: column;

    min-width: 0;
    padding: 18px 14px;

    overflow: auto;

    border-right: 1px solid #253a57;

    background: #07101a;
}


/* =========================================================
   SIDEBAR CHAPTER HEADING
   ========================================================= */

.reader-side-head {
    padding: 8px 8px 15px;

    border-bottom: 1px solid #263a55;
}

.reader-side-head span {
    color: #70a3ee;

    font-size: .66rem;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.reader-side-head strong {
    display: block;

    margin-top: 7px;

    color: #fff;
}


/* =========================================================
   SIDEBAR SECTION NAVIGATION
   ========================================================= */

.reader-section-nav {
    display: grid;

    gap: 5px;
    padding: 12px 0;
}

.reader-section-nav button {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;

    gap: 8px;
    padding: 9px 10px;

    text-align: left;

    border: 1px solid transparent;
    border-radius: 8px;

    background: transparent;
    color: #a6b7cb;

    cursor: pointer;
}

.reader-section-nav button b {
    color: #6b88ad;

    font-size: .7rem;
}

.reader-section-nav button.is-active {
    border-color: #3267af;

    background: #123767;
    color: #fff;
}


/* =========================================================
   SIDEBAR PROGRESS
   ========================================================= */

.reader-progress {
    margin-top: auto;
    padding: 14px 7px;
}

.reader-progress > span {
    color: #75a4e9;

    font-size: .64rem;
    font-weight: 900;
}

.reader-progress > div {
    height: 6px;

    margin: 8px 0;

    overflow: hidden;

    border-radius: 999px;

    background: #14243a;
}

.reader-progress i {
    display: block;

    width: 0;
    height: 100%;

    background: #3b7ff0;

    transition: width .2s;
}

.reader-progress small {
    color: #8498b0;
}


/* =========================================================
   READER MAIN COLUMN
   ========================================================= */

.reader-main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;

    min-width: 0;
    height: 100vh;
}


/* =========================================================
   READER HERO
   Gwen's main chapter photograph lives here
   ========================================================= */

.reader-hero {
    position: relative;

    min-height: 165px;
    max-height: 185px;

    overflow: hidden;

    border-bottom: 1px solid #283d59;

    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(51, 119, 237, .25),
            transparent 40%
        ),
        linear-gradient(
            130deg,
            #0b1420,
            #070b11
        );
}


/* =========================================================
   READER HERO IMAGE
   ========================================================= */

.reader-hero > img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: 72% 34%;
}


/* =========================================================
   READER HERO DARK OVERLAY
   ========================================================= */

.reader-hero-shade {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(4, 8, 13, .92),
            rgba(4, 8, 13, .35) 60%,
            rgba(4, 8, 13, .65)
        );
}


/* =========================================================
   READER HERO TEXT
   ========================================================= */

.reader-hero-copy {
    position: relative;

    z-index: 2;

    max-width: 720px;
    padding: 24px 34px;
}

.reader-hero-copy > span {
    color: #78a8f0;

    font-size: .7rem;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.reader-hero-copy h1 {
    margin: 5px 0 8px;

    font-size: clamp(2rem, 4vw, 4rem);
    line-height: .95;
    letter-spacing: -.04em;
}

.reader-hero-copy p {
    max-width: 720px;

    color: #d2dceb;

    line-height: 1.6;
}

.reader-hero-copy > div {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}

.reader-hero-copy b {
    padding: 5px 8px;

    border: 1px solid rgba(136, 179, 240, .4);
    border-radius: 999px;

    background: rgba(5, 13, 23, .62);

    font-size: .64rem;
}


/* =========================================================
   READER CLOSE BUTTON
   ========================================================= */

.reader-close {
    position: absolute;

    z-index: 5;

    right: 18px;
    top: 18px;

    width: 42px;
    height: 42px;

    border: 1px solid #87313e;
    border-radius: 50%;

    background: #321219;
    color: #fff;

    font-size: 1.5rem;

    cursor: pointer;
}


/* =========================================================
   STORY PAGE AREA
   ========================================================= */

.reader-pages {
    overflow: auto;

    scroll-behavior: smooth;
}

.reader-page {
    display: none;

    max-width: 1100px;

    margin: 0 auto;
    padding: 46px 60px 100px;
}

.reader-page.is-active {
    display: block;
}

/* =========================================================
   STORY SECTION HEADING
   ========================================================= */

.reader-page-heading {
    position: relative;

    max-width: 920px;

    margin: 0 0 28px;
    padding: 0 0 28px;

    border-bottom: 1px solid #253a55;
}


/* Small section label */

.reader-page-heading > span,
.reader-block-title > span {
    display: inline-block;

    margin-bottom: 10px;

    color: #72a4ed;

    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.reader-page-heading .section-progress-line {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 18px;

    color: #7f93ac;

    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.reader-page-heading .section-progress-line::before {
    content: "";

    width: 42px;
    height: 2px;

    background: linear-gradient(
        90deg,
        #3d80ef,
        #df2638
    );
}


/* Main section title */

.reader-page-heading h2 {
    max-width: 850px;

    margin: 0 0 16px;

    color: #ffffff;

    font-size: clamp(2.5rem, 4.5vw, 4.8rem);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.035em;
}


/* Section introduction */

.reader-page-heading > p {
    max-width: 760px;

    margin: 0;

    color: #b9c8da;

    font-size: 1.12rem;
    line-height: 1.8;
}


/* Small visual marker beneath introduction */

.reader-page-heading::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -2px;

    width: 90px;
    height: 3px;

    border-radius: 999px;

    background: linear-gradient(
        90deg,
        #3d80ef,
        #df2638
    );
}


/* =========================================================
   BIG QUOTE
   ========================================================= */

.reader-big-quote {
    position: relative;

    max-width: 860px;

    margin: 34px 0 38px;
    padding: 28px 34px 30px 42px;

    border: 0;
    border-left: 4px solid #df2638;

    background:
        linear-gradient(
            135deg,
            rgba(34, 14, 20, .96),
            rgba(12, 11, 17, .98)
        );

    color: #fff3f4;

    font-size: clamp(1.45rem, 2.6vw, 2.6rem);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -.02em;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, .22);
}

.reader-big-quote::before {
    content: "“";

    position: absolute;

    left: 14px;
    top: 4px;

    color: rgba(223, 38, 56, .45);

    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
}


/* =========================================================
   MAIN STORY TEXT
   ========================================================= */

.reader-prose {
    position: relative;

    max-width: 920px;

    margin-top: 32px;
    padding: 42px 52px 48px;

    border: 1px solid #253b58;
    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(13, 24, 38, .96),
            rgba(6, 12, 20, .98)
        );

    box-shadow:
        0 24px 70px rgba(0, 0, 0, .32),
        inset 3px 0 0 rgba(61, 128, 239, .55);
}

.reader-prose::before {
    content: "THE STORY";

    display: inline-block;

    margin-bottom: 26px;
    padding: 7px 11px;

    border: 1px solid #35547d;
    border-radius: 999px;

    background: #0b1725;
    color: #8fb8f5;

    font-size: .66rem;
    font-weight: 900;
    letter-spacing: 2.4px;
}

.reader-prose p {
    max-width: 720px;

    margin: 0 0 1.55em;

    color: #d3ddea;

    font-size: 1.12rem;
    line-height: 1.95;
}

.reader-prose p:first-child {
    color: #ffffff;

    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.85;
}

.reader-prose p:first-child::first-letter {
    float: left;

    margin: 8px 10px 0 0;

    color: #df2638;

    font-size: 4.6rem;
    font-weight: 900;
    line-height: .72;
}

.reader-prose p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   MEMORY / CONTEXT PANEL
   ========================================================= */

.reader-memory {
    max-width: 900px;

    margin-top: 28px;
    padding: 20px;

    border: 1px solid #665426;
    border-radius: 12px;

    background: #17130a;
}

.reader-memory span {
    color: #e5c268;

    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.reader-memory p {
    color: #e2d9be;

    line-height: 1.75;
}

/* =========================================================
   LEAD STORY IMAGE
   First image attached to a story section
   ========================================================= */

.reader-story-lead-image {
    position: relative;

    width: 100%;
    max-width: 920px;

    margin: 28px auto 34px;

    overflow: hidden;

    box-sizing: border-box;

    border: 1px solid #304763;
    border-radius: 18px;

    background: #05090f;

    box-shadow:
        0 24px 65px rgba(0, 0, 0, .38);
}

.reader-story-lead-image img {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 560px;

    object-fit: cover;
}

.reader-story-lead-image figcaption {
    padding: 13px 18px;

    border-top: 1px solid #253a55;

    background: #08111b;
    color: #9fb1c8;

    font-size: .82rem;
    line-height: 1.5;
}

/* =========================================================
   MEDIA BLOCK
   ========================================================= */

.reader-media-block {
    margin-top: 38px;
    padding-top: 26px;

    border-top: 1px solid #21344d;
}

.reader-block-title h3 {
    margin: 4px 0 14px;

    font-size: 1.6rem;
}


/* =========================================================
   MEDIA GRIDS
   ========================================================= */

.reader-video-grid,
.reader-photo-grid,
.reader-doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 13px;
}

.reader-video-grid article,
.reader-photo-grid figure {
    margin: 0;
    padding: 10px;

    border: 1px solid #293e5c;
    border-radius: 12px;

    background: #08111b;
}


/* =========================================================
   VIDEOS
   ========================================================= */

.reader-video {
    position: relative;

    aspect-ratio: 16 / 9;

    background: #000;
}

.reader-video iframe {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}

.reader-video-grid h4 {
    margin: 9px 0 4px;
}

.reader-video-grid p,
.reader-photo-grid figcaption {
    color: #91a6bf;

    line-height: 1.5;
}


/* =========================================================
   PHOTOS
   ========================================================= */

.reader-photo-grid img {
    display: block;

    width: 100%;
    max-height: 560px;

    object-fit: cover;

    border-radius: 8px;
}


/* =========================================================
   DOCUMENTS / LINKS
   ========================================================= */

.reader-doc-grid a,
.reader-link-grid a {
    display: grid;

    gap: 6px;
    padding: 15px;

    border: 1px solid #2c486b;
    border-radius: 10px;

    background: #0a1522;
    color: #fff;

    text-decoration: none;
}

.reader-doc-grid a > span {
    color: #76a6ee;

    font-size: .66rem;
    font-weight: 900;
}

.reader-doc-grid p,
.reader-link-grid span {
    margin: 0;

    color: #90a5be;
}

.reader-link-grid {
    display: grid;

    gap: 8px;
}


/* =========================================================
   READER FOOTER
   ========================================================= */

.reader-footer {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;

    gap: 8px;
    padding: 11px 16px;

    border-top: 1px solid #293e5b;

    background: #07101a;
}

.reader-footer button {
    padding: 9px 12px;

    border: 1px solid #35547b;
    border-radius: 8px;

    background: #0c1929;
    color: #c7dcf8;

    font-weight: 900;

    cursor: pointer;
}

.reader-footer button[data-reader-next] {
    padding: 11px 18px;

    border-color: #4f86df;

    background:
        linear-gradient(
            135deg,
            #245fbd,
            #173f83
        );

    color: #ffffff;

    box-shadow:
        0 8px 22px rgba(61, 128, 239, .22);
}

.reader-footer button[data-reader-next]:hover {
    border-color: #78a7f0;

    background:
        linear-gradient(
            135deg,
            #2d6ed0,
            #1b4b9d
        );

    transform: translateY(-1px);
}

.reader-footer button[data-reader-prev] {
    opacity: .82;
}

.reader-footer strong {
    text-align: center;

    color: #8198b5;

    font-size: .7rem;
}


/* =========================================================
   TABLET / SMALL DESKTOP
   ========================================================= */

@media (max-width: 900px) {

    .book-timeline {
        padding-left: 55px;
    }

    .book-spine {
        left: 20px;
    }

    .book-date-node {
        left: -52px;
        top: -12px;

        width: auto;

        text-align: left;
    }

    .book-date-node i {
        display: none;
    }

    .book-chapter-open {
        grid-template-columns: 1fr;
    }

    .book-card-media {
        max-height: 340px;
    }

    .reader-shell {
        grid-template-columns: 1fr;
    }

    .reader-sidebar {
        position: absolute;

        z-index: 10;

        left: 0;
        right: 0;
        top: 0;

        display: none;

        max-height: 45vh;

        border-right: 0;
        border-bottom: 1px solid #2a405f;
    }

    .reader-main {
        height: 100vh;
    }

    .reader-hero-copy {
        padding: 30px 22px;
    }

    .reader-page {
        padding: 28px 20px 80px;
    }

    .reader-video-grid,
    .reader-photo-grid,
    .reader-doc-grid {
        grid-template-columns: 1fr;
    }

    .reader-footer {
        grid-template-columns: 1fr 1fr;
    }

    .reader-footer strong {
        display: none;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .book-archive {
        width: calc(100% - 14px);
    }

    .book-controls {
        position: relative;

        top: auto;
    }

    .book-controls label {
        grid-template-columns: 1fr;
    }

    .book-timeline {
        padding-left: 38px;
    }

    .book-spine {
        left: 10px;
    }

    .book-date-node {
        left: -38px;
    }

    .reader-hero {
        min-height: 250px;
    }

    .reader-hero-copy h1 {
        font-size: 2.5rem;
    }

    .reader-footer button {
        padding: 8px;

        font-size: .7rem;
    }
}

/* =========================================================
   STORY READING PROGRESS
   ========================================================= */

.reader-story-progress {
    max-width: 920px;
    margin: 52px 0 16px;
    padding-top: 26px;
    border-top: 1px solid #253a55;
}

.reader-story-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
}

.reader-story-progress-top span {
    color: #72a4ed;
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: 2.2px;
}

.reader-story-progress-top strong {
    color: #ffffff;
    font-size: .82rem;
    font-weight: 900;
}

.reader-story-progress-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #14243a;
}

.reader-story-progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #3d80ef,
        #df2638
    );
    transition: width .35s ease;
}

.reader-story-progress small {
    display: block;
    margin-top: 9px;
    color: #8498b0;
    font-size: .72rem;
}