:root {
    --beige: #f5f0e8;
    --beige-dark: #ede5d6;
    --brown: #7a5c3e;
    --brown-light: #a07850;
    --green: #3d5c3a;
    --green-light: #5a7d56;
    --green-pale: #c8d9c4;
    --slate: #3a3530;
    --slate-mid: #5a5248;
    --slate-light: #8a7f76;
    --cream: #faf7f2;
    --charcoal: #0a2007;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-y: scroll;
    height: 100%;
}

body {
    font-family: 'Crimson Pro', Georgia, serif;
    background-color: var(--slate);
    color: var(--beige);
    height: 100%;
    cursor: default;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("https://theoryofwolves.com/images/white_paper.webp");
    background-size: cover;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.08;
}

strong {
    font-weight: bold;
}

.slide {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 8vw;
    overflow: hidden;
    background-color: var(--charcoal);
}

.slide:nth-child(odd) {
    background-color: #0d1a0b;
}

.slide:nth-child(even) {
    background-color: #0a1508;
}

.slide.photo-cover {
    background-color: #000;
    padding: 0;
}

.slide.photo-grid {
    background-color: #060e05;
    padding: 0;
}

.slide-inner {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1100px;
}

.slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    height: 100vh;
    width: 100vw;
}

.split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6vh 5vw 6vh 8vw;
    position: relative;
    z-index: 10;
}

.split-image {
    position: relative;
    overflow: hidden;
}

.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.split-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #0d1a0b 0%, transparent 30%);
    z-index: 2;
    pointer-events: none;
}

.eyebrow {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(0.62rem, 0.9vw, 0.8rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--green-pale);
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.85;
}

.eyebrow::after {
    content: '';
    display: inline-block;
    width: 3rem;
    height: 1px;
    background: var(--green-pale);
    opacity: 0.5;
}

h1.display {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    line-height: 0.9;
    color: var(--beige);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

h1.display em {
    font-style: italic;
    color: var(--green-pale);
}

h2.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    font-weight: 400;
    color: var(--beige);
    line-height: 1.08;
    margin-bottom: 1.6rem;
}

h2.section-title em {
    font-style: italic;
    color: var(--green-pale);
}

.body-text {
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.75;
    color: rgba(245, 240, 232, 0.78);
    font-weight: 300;
    max-width: 620px;
}

.body-text+.body-text {
    margin-top: 1.2rem;
}

.pull-quote {
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    color: var(--green-pale);
    line-height: 1.55;
    border-left: 2px solid rgba(200, 217, 196, 0.4);
    padding-left: 1.5rem;
    margin-top: 2rem;
    max-width: 560px;
}

.logline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    color: rgba(245, 240, 232, 0.72);
    line-height: 1.65;
    max-width: 580px;
    margin-top: 2rem;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(200, 217, 196, 0.2);
}

.slide-number {
    position: absolute;
    bottom: 2rem;
    left: 8vw;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    color: rgba(200, 217, 196, 0.35);
    font-weight: 600;
    text-transform: uppercase;
    z-index: 20;
}

.divider {
    width: 3rem;
    height: 1px;
    background: var(--green-pale);
    opacity: 0.3;
    margin: 1.6rem 0;
}

.char-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 400;
    color: var(--beige);
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.char-role {
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--green-pale);
    font-weight: 600;
    margin-bottom: 1.4rem;
    opacity: 0.8;
}

.comp-label {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--green-pale);
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.75;
}

.comp-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--beige);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.comp-note {
    font-size: clamp(0.85rem, 1.05vw, 0.97rem);
    color: rgba(245, 240, 232, 0.6);
    line-height: 1.6;
    font-weight: 300;
}

.img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    padding: 4vh 4vw;
}

.img-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.88) saturate(0.92);
    transition: filter 0.3s;
}

.img-grid img:hover {
    filter: brightness(1) saturate(1);
    z-index: 2;
}

.grid-label {
    position: absolute;
    top: 2rem;
    left: 4vw;
    z-index: 20;
}

.prestige-item {
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(200, 217, 196, 0.12);
    display: grid;
    grid-template-columns: 1.8rem 1fr;
    gap: 1.2rem;
    align-items: baseline;
}

.prestige-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--green-pale);
    opacity: 0.45;
}

.prestige-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(0.95rem, 1.3vw, 1.12rem);
    color: var(--beige);
    margin-bottom: 0.2rem;
}

.prestige-body {
    font-size: clamp(0.85rem, 1.05vw, 0.97rem);
    color: rgba(245, 240, 232, 0.58);
    line-height: 1.6;
    font-weight: 300;
}

#nav-dots {
    position: fixed;
    right: 1.8rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 9999;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid rgba(200, 217, 196, 0.45);
    background: transparent;
    cursor: pointer;
    transition: all 0.35s ease;
    display: block;
}

.dot.active {
    background: var(--green-pale);
    border-color: var(--green-pale);
    transform: scale(1.2);
}

#nav-arrows {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 9999;
}

.arrow-btn {
    width: 38px;
    height: 38px;
    background: rgba(200, 217, 196, 0.1);
    border: 1px solid rgba(200, 217, 196, 0.2);
    color: var(--green-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    backdrop-filter: blur(4px);
    font-size: 1rem;
}

.arrow-btn:hover {
    background: var(--green);
    border-color: var(--green);
    color: var(--beige);
}

#export-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

#export-btn:hover,
body:hover #export-btn {
    opacity: 1;
}

#export-btn button {
    font-family: 'Crimson Pro', serif;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.7rem 1.4rem;
    background: rgba(10, 32, 7, 0.85);
    color: var(--green-pale);
    border: 1px solid rgba(200, 217, 196, 0.25);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.25s;
    font-weight: 600;
}

#export-btn button:hover {
    background: var(--green);
    border-color: var(--green);
    color: var(--beige);
}

@media print {

    /* ── Page setup: one slide per page, no margins, landscape ── */
    @page {
        margin: 0;
        size: 297mm 167mm landscape;
    }

    /* ── Reset scroll/snap behaviour ── */
    html {
        scroll-snap-type: none;
        scroll-behavior: auto;
        height: auto;
        overflow: visible;
    }

    /* ── Force background colours and images to print ── */
    *,
    *::before,
    *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* ── Hide navigation chrome ── */
    #nav-dots,
    #nav-arrows,
    #export-btn,
    body::before {
        display: none !important;
    }

    /* ── Each slide = one page, full viewport size ── */
    .slide {
        page-break-before: always;
        break-before: page;
        page-break-after: always;
        break-after: page;
        width: 100vw;
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .slide:first-child {
        page-break-before: avoid;
        break-before: avoid;
    }

    /* ── Preserve all dark background colours explicitly ── */
    body {
        background-color: #0d1a0b !important;
    }

    .slide:nth-child(odd) {
        background-color: #0d1a0b !important;
    }

    .slide:nth-child(even) {
        background-color: #0a1508 !important;
    }

    .slide.photo-cover {
        background-color: #000000 !important;
    }

    .slide.photo-grid {
        background-color: #060e05 !important;
    }

    #slide-5 {
        background-color: #080f07 !important;
    }

    /* ── Ensure full-bleed images render at full size ── */
    .slide-bg {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* ── Preserve overlay gradients ── */
    .slide-overlay {
        position: absolute !important;
        inset: 0 !important;
    }

    /* ── Split layout: keep two-column grid ── */
    .split-layout {
        width: 100vw !important;
        height: 100vh !important;
    }

    /* ── Add left gutter to slide-inner on slides 1 & 3
            (photo-cover and padding:0 slides have no inherited padding) ── */
    .slide-inner {
        padding-left: 8vw !important;
        padding-right: 8vw !important;
    }

    /* ── Photo grid: keep label and images visible ── */
    .photo-grid-inner {
        position: absolute !important;
        inset: 0 !important;
    }

    /* ── Grid images: show full image without cropping ── */
    .photo-grid-inner img {
        object-fit: contain !important;
        object-position: center !important;
        background-color: #060e05 !important;
    }
}

/* ─── Photo grid inner layout ─── */
.photo-grid-inner {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    padding: 5.5rem 4rem 0 4rem;
}

.photo-grid-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85) saturate(0.9);
    transition: filter 0.3s;
}

.photo-grid-inner img:hover {
    filter: brightness(1) saturate(1);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE ONLY — everything above this line is the original,
   unchanged CSS. Only additions below.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Allow text-heavy slides to scroll past one screen height */
    .slide {
        height: auto;
        min-height: 100svh;
        overflow-y: visible;
        padding: 5vh 6vw 8vh;
    }

    /* Photo-cover and photo-grid slides stay full-bleed / fixed height */
    .slide.photo-cover,
    .slide.photo-grid {
        height: 100svh;
        min-height: 100svh;
        overflow: hidden;
        padding: 0;
    }

    /* Slides 1 & 12 (photo-cover): use split-text horizontal padding and
       pull text up so it sits higher, not pressed against the bottom */
    #slide-1 .slide-inner,
    #slide-12 .slide-inner {
        padding-left: 8vw !important;
        padding-right: 8vw !important;
        padding-bottom: 14vh !important;
    }

    /* Slide 3: match split-text horizontal padding on mobile */
    #slide-3 .split-text {
        padding-left: 8vw !important;
        padding-right: 8vw !important;
    }

    /* Slightly tighter line-height on body text for mobile */
    .body-text {
        line-height: 1.55;
    }

    .logline {
        line-height: 1.5;
    }

    /* ── Collapse all split (two-column) layouts to single column ── */
    .split-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100svh;
        width: 100%;
    }

    /* Text always on top */
    .split-text {
        order: 1;
        padding: 5vh 6vw 3vh !important;
        justify-content: flex-start;
    }

    /* Image half (via .split-image class) always on bottom */
    .split-image {
        order: 2;
        height: 40vmax;
        min-height: 220px;
        flex-shrink: 0;
    }

    /* Slide 2: image half is a plain div, not .split-image */
    #slide-2 .split-layout>div:not(.split-text) {
        order: 2;
        height: 40vmax;
        min-height: 220px;
        flex-shrink: 0;
    }

    /* Slide 4: image div is first in DOM — reorder so text appears on top */
    #slide-4 .split-layout>div:first-child {
        order: 2;
        height: 40vmax;
        min-height: 220px;
        flex-shrink: 0;
    }

    #slide-4 .split-text {
        order: 1;
    }

    /* Slide 6: direction:rtl split — neutralise direction, keep text on top */
    #slide-6 .split-layout {
        direction: ltr !important;
    }

    #slide-6 .split-layout>div:not(.split-text) {
        order: 2;
        height: 40vmax;
        min-height: 220px;
        direction: ltr;
        flex-shrink: 0;
    }

    #slide-6 .split-layout>div:not(.split-text)>div[style*="grid-template-rows"] {
        height: 40vmax !important;
    }

    /* ── Slides 5, 11: inline two-column grids → single column ── */
    #slide-5 .slide-inner,
    #slide-11 .slide-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        height: auto !important;
    }

    /* Slide 5: inline image block */
    #slide-5 .slide-inner>div:last-child>div[style*="height:28vh"] {
        height: 35vmax !important;
    }

    /* ── Photo-grid slides: stack images vertically, no truncation ── */
    .photo-grid-inner {
        position: relative;
        inset: auto;
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 5rem 0 0 0;
        height: calc(100svh - 5rem);
    }

    .photo-grid-inner img {
        flex: 1;
        width: 100%;
        height: auto;
        min-height: 0;
        object-fit: contain;
        object-position: center;
    }

    /* ── Nav dots: move to bottom-centre for thumb reach ── */
    #nav-dots {
        right: auto;
        top: auto;
        bottom: 0.75rem;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 0.5rem;
    }
}