/* ════════════════════════════════════════
   ABOUT — FIELD GUIDE
════════════════════════════════════════ */

/* ─── Section shell: clips the horizontal track ─── */
.section-about {
    width: 100%;
    min-height: 100vh;
    padding-top: var(--nav-h);
    overflow: clip;
    position: relative;
    background-color: #f5f0e2;
    box-sizing: border-box;
}

/* ─── Horizontal track holding both panels ─── */
.about-track {
    display: flex;
    flex-direction: row;
    width: 200vw;
    min-height: calc(100vh - var(--nav-h));
    transition: transform 0.75s cubic-bezier(0.77, 0, 0.18, 1);
    will-change: transform;
}

.about-track.show-guide {
    transform: translateX(-100vw);
}

/* ─── Each panel is one full viewport ─── */
.about-panel {
    width: 100vw;
    min-height: calc(100vh - var(--nav-h));
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

/* ─── Map panel ─── */
.about-map-panel {
    background-color: #f5f0e2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    overflow-y: visible;
    padding-top: 0;
    padding-bottom: 40px;
}

.about-header {
    flex: 0 0 33.333%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    padding: 80px 48px 48px 56px;
    max-width: none;
    flex-shrink: 0;
}

.about-header h2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--slate);
    margin: 0 0 0.6rem;
    line-height: 1.1;
}

.about-synopsis {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    line-height: 1.42;
    color: var(--slate);
    font-weight: 300;
    margin-top: 1.4rem;
    opacity: 0.85;
}

.about-intro {
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate-light);
    margin: 0;
}

/* ─── Map ─── */
.map-wrap {
    position: relative;
    flex: 0 0 66.667%;
    width: 66.667%;
    max-width: none;
    padding: 0 24px 0 0;
    align-self: center;
    flex-shrink: 0;
}

.field-map {
    width: 100%;
    height: auto;
    display: block;
}

/* Node interaction */
.map-node {
    transition: opacity 0.2s;
}

.map-node:hover .node-ring {
    animation: none;
    opacity: 0.9 !important;
    stroke-width: 1.8;
}

.node-ring {
    animation: node-pulse 3s ease-in-out infinite;
    transform-origin: center;
}

.map-node:nth-child(2) .node-ring {
    animation-delay: 0.4s;
}

.map-node:nth-child(3) .node-ring {
    animation-delay: 0.8s;
}

.map-node:nth-child(4) .node-ring {
    animation-delay: 1.2s;
}

.map-node:nth-child(5) .node-ring {
    animation-delay: 1.6s;
}

.map-node:nth-child(6) .node-ring {
    animation-delay: 2.0s;
}

.map-node:nth-child(7) .node-ring {
    animation-delay: 2.4s;
}

@keyframes node-pulse {

    0%,
    100% {
        r: 15;
        opacity: 0.25;
    }

    50% {
        r: 21;
        opacity: 0.08;
    }
}

/* Tooltip */
.map-tooltip {
    position: absolute;
    background: var(--ink);
    color: var(--cream);
    font-family: 'Crimson Pro', serif;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    padding: 7px 14px;
    border-radius: 3px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
    z-index: 10;
}

.map-tooltip.visible {
    opacity: 1;
}

/* ─── Guide panel ─── */
.about-guide-panel {
    background-color: #f5f0e2;
    justify-content: center;
    align-items: stretch;
    padding: 0;
}

/* ─── Spread — fills the guide panel ─── */
.guide-spread {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: var(--cream);
}

/* Spine shadow */
.guide-spread::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to right, rgba(28, 26, 23, 0.14), rgba(28, 26, 23, 0.04));
    z-index: 2;
    pointer-events: none;
}

/* Back button */
.guide-back {
    position: absolute;
    top: 100px;
    left: 24px;
    z-index: 20;
    background: none;
    border: none;
    font-family: 'Crimson Pro', serif;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-light);
    cursor: pointer;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, gap 0.2s;
}

.guide-back:hover {
    color: var(--ink);
    gap: 10px;
}

.guide-back-arrow {
    font-size: 1rem;
    line-height: 1;
}

/* ─── Pages ─── */
.guide-page {
    flex: 1;
    padding: 56px 48px 48px;
    position: relative;
    min-height: 0;
    overflow: hidden;
}

/* Left page — content centered vertically and horizontally */
.guide-left {
    background: var(--bg);
    border-right: 1px solid rgba(90, 82, 72, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.guide-left-inner {
    text-align: right;
    width: 100%;
}

.guide-coordinates {
    font-family: 'Crimson Pro', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--slate-light);
    text-transform: uppercase;
    margin: 0 auto 1.5rem;
    opacity: 0.7;
}

.guide-sketch {
    width: 100%;
    max-width: 400px;
    margin: 0 0 1.8rem auto;
    display: block;
    border: 1px solid var(--nav-grey);
}

.guide-sketch img {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    object-fit: cover;
}

.guide-location-name {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.55rem;
    color: var(--slate);
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.guide-location-sub {
    font-family: 'Crimson Pro', serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-light);
    margin: 0 0 1.5rem auto;
}

.guide-stamp {
    font-family: 'IM Fell English', serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crimson);
    opacity: 0.55;
    border: 1.5px solid var(--crimson);
    display: inline-block;
    padding: 4px 10px;
    transform: rotate(-3deg);
}

/* ─── Decorative field-guide images ─── */

/* Left page — anchored bottom-left */
.guide-deco-left {
    position: absolute;
    bottom: 0;
    left: 0;
    max-width: 100%;
    pointer-events: none;
    z-index: 0;
}

.guide-deco-left img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Right page — anchored bottom-right */
.guide-deco-right {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 55%;
    pointer-events: none;
    z-index: 0;
}

.guide-deco-right img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Ensure text content sits above decorative images */
.guide-left-inner {
    position: relative;
    z-index: 1;
}

.guide-right-inner {
    position: relative;
    z-index: 1;
}

/* Per-location opacity + layout overrides */
.guide-deco-left--fort-clarke {
    opacity: 0.58;
}

.guide-deco-left--queensmark {
    opacity: 0.50;
}

.guide-deco-left--reservation {
    opacity: 0.48;
    bottom: 0;
    left: 0;
}

.guide-deco-left--weston {
    opacity: 0.60;
}

.guide-deco-left--dean-ranch {
    opacity: 0.40;
}

.guide-deco-left--clearwater {
    opacity: 0.80;
    max-width: 75%;
}

.guide-deco-left--gorge {
    opacity: 0.45;
    max-width: 45%;
}

.guide-deco-right--fort-clarke {
    opacity: 0.85;
}

.guide-deco-right--queensmark {
    opacity: 0.45;
    max-width: 45%;
}

.guide-deco-right--reservation {
    opacity: 0.75;
    max-width: 65%;
}

.guide-deco-right--weston {
    opacity: 0.50;
}

.guide-deco-right--dean-ranch {
    opacity: 0.45;
    right: 0;
}

.guide-deco-right--clearwater {
    opacity: 0.85;
    max-width: 45%;
}

.guide-deco-right--gorge {
    opacity: 0.75;
}

/* Secondary decorative image on left page — top-right anchor */
.guide-deco-left2 {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 55%;
    pointer-events: none;
    z-index: 0;
}

.guide-deco-left2 img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0.85;
}

/* Fort Clarke left page secondary deco */
.guide-deco-left2--fort-clarke {
    opacity: 0.45;
    max-width: 50%;
}

/* Secondary decorative image — bottom-right anchor */
.guide-deco-right2 {
    position: absolute;
    bottom: 0;
    right: 0;
    max-width: 55%;
    pointer-events: none;
    z-index: 0;
}

.guide-deco-right2 img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.guide-deco-right2--fort-clarke {
    opacity: 0.50;
    max-width: 55%;
}

/* Left-page content pushed to right side — flex-end on the container,
   inner block constrained to right half, text right-aligned */
.guide-left--queensmark,
.guide-left--reservation,
.guide-left--weston,
.guide-left--clearwater,
.guide-left--gorge {
    justify-content: flex-end;
    align-items: center;
}

.guide-left--queensmark .guide-left-inner,
.guide-left--reservation .guide-left-inner,
.guide-left--weston .guide-left-inner,
.guide-left--clearwater .guide-left-inner,
.guide-left--gorge .guide-left-inner {
    text-align: right;
    width: 58%;
    margin-right: 0;
}


/* Right page — outer flex centers the inner block vertically */
.guide-right {
    background: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Inner wrapper — scrolls independently, max height keeps it contained */
.guide-right-inner {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow-y: auto;
    flex-shrink: 1;
    position: relative;
}

.guide-right-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: -1;
    pointer-events: none;
}

/* Tabs */
.guide-tabs {
    display: flex;
    border-bottom: 1px solid rgba(90, 82, 72, 0.15);
    margin-bottom: 1.8rem;
    flex-shrink: 0;
}

.guide-tab {
    font-family: 'Crimson Pro', serif;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate-light);
    background: none;
    border: none;
    padding: 10px 20px 10px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.25s;
}

.guide-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--ink);
    transition: width 0.3s ease;
}

.guide-tab.active {
    color: var(--ink);
}

.guide-tab.active::after,
.guide-tab:hover::after {
    width: calc(100% - 20px);
}

.guide-tab:hover {
    color: var(--slate);
}

/* Content area */
.guide-content {
    font-family: 'Crimson Pro', serif;
    overflow-y: auto;
    transition: opacity 0.18s ease;
    max-height: 60vh;
}

/* Story tab */
.guide-story-text {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--slate-mid);
    margin: 0 0 1.4rem;
}

.guide-story-note {
    font-size: 0.88rem;
    font-style: italic;
    color: var(--slate-light);
    border-left: 2px solid rgba(90, 82, 72, 0.2);
    padding-left: 14px;
    margin: 0;
    line-height: 1.7;
}

/* Characters tab */
.guide-character {
    display: flex;
    gap: 16px;
    margin-bottom: 1.6rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid rgba(90, 82, 72, 0.1);
    align-items: flex-start;
}

.guide-character:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.char-portrait {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 2px;
}

.char-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.9;
}

.char-info {
    flex: 1;
    min-width: 0;
}

.char-name {
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    color: var(--slate);
    margin: 0 0 0.2rem;
}

.char-role {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate-light);
    margin: 0 0 0.5rem;
    opacity: 0.8;
}

.char-desc {
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--slate-mid);
    margin: 0;
}

.char-redacted {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--slate-light);
    margin: 0.4rem 0 0;
    opacity: 0.6;
}

.char-redacted span {
    display: inline-block;
    background: var(--slate);
    color: transparent;
    border-radius: 1px;
    user-select: none;
    font-size: 0.75rem;
    padding: 1px 2px;
    letter-spacing: 0.05em;
}

/* Themes tab */
.guide-theme {
    margin-bottom: 1.8rem;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid rgba(90, 82, 72, 0.1);
}

.guide-theme:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.theme-title {
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    color: var(--slate);
    margin: 0 0 0.5rem;
    letter-spacing: 0.02em;
}

.theme-body {
    font-size: 1rem;
    line-height: 1.78;
    color: var(--slate-mid);
    margin: 0;
}

/* Scrollbars */
.guide-content::-webkit-scrollbar,
.guide-left::-webkit-scrollbar {
    width: 4px;
}

.guide-content::-webkit-scrollbar-track,
.guide-left::-webkit-scrollbar-track {
    background: transparent;
}

.guide-content::-webkit-scrollbar-thumb,
.guide-left::-webkit-scrollbar-thumb {
    background: rgba(90, 82, 72, 0.2);
    border-radius: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {

    /* About section: stacked vertical, no horizontal track */
    .section-about {
        height: auto;
        overflow: visible;
    }

    .about-track {
        width: 100%;
        flex-direction: column;
        transition: none;
        transform: none !important;
    }

    /* Map panel: header above map, map fills container */
    .about-map-panel {
        flex-direction: column;
        overflow-y: visible;
        height: auto;
        min-height: unset;
        width: 100%;
    }

    .about-header {
        flex: none;
        width: 100%;
        padding: calc(var(--nav-h) + 24px) 24px 20px;
        align-items: center;
        text-align: center;
    }

    .about-header h2,
    .about-header .section-label {
        text-align: center;
    }

    .map-wrap {
        flex: none;
        width: 100%;
        padding: 0;
        overflow: hidden;
    }

    /* Map scales to fit container, no horizontal scroll */
    .field-map {
        width: 100%;
        min-width: unset;
        height: auto;
    }

    /* Larger node text on mobile for legibility */
    .map-node text:first-of-type {
        font-size: 23px !important;
    }

    .map-node text:last-of-type {
        font-size: 18px !important;
        /* More air between lines — shift subtitle down */
    }

    /* Guide panel: hidden by default on mobile, shown when location selected */
    .about-guide-panel {
        width: 100%;
        height: auto;
        min-height: unset;
        display: none;
    }

    /* Show guide panel when a location has been opened */
    .about-guide-panel.mobile-open {
        display: flex;
        flex-direction: column;
    }

    /* Spread stacks vertically */
    .guide-spread {
        flex-direction: column;
        height: auto;
        min-height: unset;
        overflow-y: visible;
    }

    .guide-spread::after {
        display: none;
    }

    .guide-left {
        border-right: none;
        border-bottom: 1px solid rgba(90, 82, 72, 0.12);
        height: auto;
        flex: none;
        overflow-y: visible;
        padding: 28px 24px 24px;
        min-height: unset;
    }

    .guide-right {
        justify-content: flex-start;
        flex: none;
        height: auto;
        overflow-y: visible;
    }

    .guide-right-inner {
        max-height: none;
    }

    .guide-content {
        max-height: none;
    }

    .guide-page {
        height: auto;
        padding: 28px 24px;
    }

    .guide-sketch {
        max-width: 200px;
        min-height: unset;
    }

    /* Back button: top 0 on mobile */
    .guide-back {
        top: 0px;
    }
}