/* Sideways story deck used on the homepage, /blog and under each article (see journal-slider.js). */
.jslider {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 1px 12px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.jslider::-webkit-scrollbar { display: none; }
.jslider:focus-visible { outline: 1px solid #829281; outline-offset: 6px; }
.jslider.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
@media (min-width: 768px) { .jslider { gap: 2rem; } }

.jslide {
    flex: 0 0 auto;
    width: 80vw;
    max-width: 360px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    color: #1c2327;
    -webkit-user-drag: none;
}
@media (min-width: 768px) { .jslide { width: 360px; } }

.jslide-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #eceeea; border: 1px solid rgba(0,0,0,0.05); }
.jslide-photo img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: grayscale(15%);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}
.jslide:hover .jslide-photo img { transform: scale(1.04); filter: grayscale(0); }
.jslide-date {
    position: absolute; left: 0.75rem; bottom: 0.75rem;
    background: rgba(20,27,31,0.85); color: #fff;
    font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase;
    padding: 0.4rem 0.75rem; border-radius: 2px;
}
.jslide-credit { margin-top: 0.5rem; font-family: 'JetBrains Mono', monospace; font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: #9aa3a6; }
.jslide-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(0,0,0,0.05);
    font-family: 'JetBrains Mono', monospace; text-transform: uppercase;
}
.jslide-cat { font-size: 10px; letter-spacing: 0.05em; color: #829281; font-weight: 500; }
.jslide-time { font-size: 9px; letter-spacing: 0.05em; color: #9ca3af; font-weight: 700; white-space: nowrap; }
.jslide-title {
    margin-top: 0.9rem; font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 1.2rem; line-height: 1.35; color: #1c2327; transition: color 0.3s ease;
}
@media (min-width: 768px) { .jslide-title { font-size: 1.35rem; } }
.jslide:hover .jslide-title { color: #4a5d4e; }
.jslide-excerpt { margin-top: 0.5rem; font-size: 0.8rem; line-height: 1.65; color: #4b5563; }
@media (min-width: 768px) { .jslide-excerpt { font-size: 0.875rem; } }
.jslide-read {
    margin-top: auto; padding-top: 1rem;
    font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 700; color: #1c2327;
}
.jslide-read span { display: inline-block; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.jslide:hover .jslide-read span { transform: translateX(6px); }

/* Closing "All stories" card */
.jslide-all {
    align-items: center; justify-content: center; text-align: center;
    aspect-ratio: 4 / 5; height: auto; align-self: flex-start;
    border: 1px solid rgba(130,146,129,0.5); background: #f1f3ef;
    font-size: 1.6rem; color: #1c2327; transition: background 0.4s ease, color 0.4s ease;
}
.jslide-all:hover { background: #1c2327; color: #fff; }

/* Previous / next arrows */
.jslider-nav { display: flex; align-items: center; gap: 0.5rem; }
.jslider-btn {
    width: 2.6rem; height: 2.6rem; border-radius: 9999px;
    border: 1px solid rgba(28,35,39,0.2); color: #1c2327; background: transparent;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.95rem; transition: all 0.3s ease; cursor: pointer;
}
.jslider-btn:hover:not(:disabled) { background: #1c2327; color: #fff; border-color: #1c2327; }
.jslider-btn:disabled { opacity: 0.3; cursor: default; }
.jslider-btn:focus { outline: none; }
.jslider-btn:focus-visible { outline: 1px solid #829281; outline-offset: 3px; }
