/* Journal: listing, cards, and the editorial article layout. Uses the storefront tokens (storefront.css). */

.journal-page { padding-top: 56px; }

.j-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 44px;
}

.j-filters a {
    font-size: 12.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 9px 18px;
    border: 1px solid var(--beige-border);
    color: var(--text-muted);
    transition: all .25s ease;
}

.j-filters a:hover,
.j-filters a.active {
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: var(--white);
}

.j-empty {
    text-align: center;
    padding: 90px 20px;
    border: 1px dashed var(--beige-border);
    background: var(--white);
}

.j-empty h3 { font-size: 26px; margin-bottom: 10px; }
.j-empty p { color: var(--text-muted); margin-bottom: 18px; }

/* ---------- cards ---------- */
.j-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 44px 32px;
}

.j-card { display: flex; flex-direction: column; }

.j-card-img {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--ivory-2);
    margin-bottom: 20px;
}

.j-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.j-card:hover .j-card-img img { transform: scale(1.04); }

.j-cat {
    font-size: 11.5px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--terracotta);
    font-weight: 500;
    margin-bottom: 10px;
    display: inline-block;
    align-self: flex-start;
}

.j-card h3 {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 10px;
}

.j-card h3 a:hover { color: var(--terracotta); }

.j-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.j-meta,
.j-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.j-meta i,
.j-byline i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--terracotta);
}

.j-more { align-self: flex-start; margin-top: 16px; }

.j-card-lead {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid var(--beige-border);
}

.j-card-lead .j-card-img { aspect-ratio: 16 / 11; margin-bottom: 0; }
.j-card-lead h3 { font-size: clamp(28px, 3vw, 40px); }
.j-card-lead .j-excerpt { font-size: 17px; -webkit-line-clamp: 5; }

.j-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 64px;
}

.j-pager a {
    min-width: 42px;
    padding: 10px 14px;
    text-align: center;
    font-size: 14px;
    border: 1px solid var(--beige-border);
    color: var(--charcoal);
    transition: all .25s ease;
}

.j-pager a:hover,
.j-pager a.active {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: var(--white);
}

/* ---------- article ---------- */
.j-preview-bar {
    margin-top: 68px;
    background: var(--charcoal);
    color: var(--white);
    text-align: center;
    font-size: 13px;
    padding: 10px 16px;
}

.j-preview-bar a { color: #e9b79f; margin-left: 14px; text-decoration: underline; }

.j-article { padding: 68px 0 40px; }
.j-preview-bar + .j-article { padding-top: 0; }

.j-article-head {
    max-width: 860px;
    margin: 0 auto;
    padding: 64px 24px 40px;
    text-align: center;
}

.j-back {
    display: inline-block;
    font-size: 12.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.j-back:hover { color: var(--terracotta); }

.j-article-head .eyebrow { display: block; margin-bottom: 18px; }

.j-article-head h1 {
    font-size: clamp(34px, 5.2vw, 62px);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 22px;
}

.j-dek {
    font-family: var(--font-script);
    font-style: italic;
    font-size: clamp(20px, 2.2vw, 27px);
    line-height: 1.5;
    color: var(--brown);
    max-width: 700px;
    margin: 0 auto 28px;
}

.j-byline { justify-content: center; font-size: 13.5px; }
.j-byline strong { color: var(--charcoal); font-weight: 500; }

.j-cover {
    max-width: 1180px;
    margin: 0 auto 64px;
    padding: 0 24px;
}

.j-cover img {
    width: 100%;
    max-height: 640px;
    object-fit: cover;
    display: block;
}

.j-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    font-size: 18.5px;
    line-height: 1.85;
    font-weight: 300;
    color: #2b2623;
    overflow-wrap: break-word;
}

.j-body > * + * { margin-top: 1.4em; }

.j-body > p:first-child::first-letter {
    font-family: var(--font-serif);
    float: left;
    font-size: 4.6em;
    line-height: .82;
    padding: .08em .12em 0 0;
    color: var(--terracotta);
}

.j-body h2,
.j-body h3,
.j-body h4 {
    font-family: var(--font-serif);
    color: var(--charcoal);
    line-height: 1.25;
    margin-top: 2.2em;
}

.j-body h2 { font-size: 34px; }
.j-body h3 { font-size: 27px; }
.j-body h4 { font-size: 21px; }

.j-body a { color: var(--terracotta); border-bottom: 1px solid rgba(184, 98, 63, .4); }
.j-body a:hover { border-bottom-color: var(--terracotta); }
.j-body strong, .j-body b { font-weight: 600; color: var(--charcoal); }

.j-body ul,
.j-body ol { padding-left: 1.4em; }
.j-body ul { list-style: disc; }
.j-body ol { list-style: decimal; }
.j-body li + li { margin-top: .5em; }
.j-body li::marker { color: var(--terracotta); }

.j-body blockquote {
    margin: 2.4em -40px;
    padding: 6px 0 6px 32px;
    border-left: 3px solid var(--terracotta);
    font-family: var(--font-script);
    font-style: italic;
    font-size: 28px;
    line-height: 1.45;
    color: var(--brown);
}

.j-body blockquote p + p { margin-top: .8em; }

.j-body img { max-width: 100%; height: auto; display: block; margin: 2em auto; }

.j-body figure { margin: 2.2em 0; }
.j-body figure img { margin: 0 auto; }
.j-body figcaption {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

.j-body hr { border: 0; border-top: 1px solid var(--beige-border); margin: 3em auto; width: 80px; }

.j-body pre,
.j-body code { font-family: Consolas, monospace; font-size: .88em; background: var(--ivory-2); }
.j-body code { padding: 2px 6px; }
.j-body pre { padding: 18px 20px; overflow-x: auto; }

/* image alignment from the editor */
.j-body .align-left, .j-body img[style*="float: left"], .j-body figure[style*="float: left"] { float: left; margin: .4em 28px 1em -60px; max-width: 50%; }
.j-body .align-right, .j-body img[style*="float: right"], .j-body figure[style*="float: right"] { float: right; margin: .4em -60px 1em 28px; max-width: 50%; }
.j-body .align-center { margin-left: auto; margin-right: auto; text-align: center; }
.j-body img[style*="float"] { margin-top: .4em; }
.j-body p::after { content: ""; display: table; clear: both; }

.j-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.6;
    display: block;
    overflow-x: auto;
}

.j-body th,
.j-body td { border: 1px solid var(--beige-border); padding: 10px 14px; text-align: left; vertical-align: top; }
.j-body th { background: var(--ivory-2); font-weight: 500; }

.j-body iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    margin: 2em auto;
}

.j-end {
    max-width: 720px;
    margin: 56px auto 0;
    padding: 28px 24px 0;
    border-top: 1px solid var(--beige-border);
    clear: both;
}

.j-related {
    background: var(--ivory-2);
    border-top: 1px solid var(--beige-border);
    padding: 84px 0 96px;
}

.j-related h2 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 44px; }

@media (max-width: 1024px) {
    .j-grid { grid-template-columns: repeat(2, 1fr); }
    .j-card-lead { grid-template-columns: 1fr; gap: 28px; }
    .j-body blockquote { margin-left: 0; margin-right: 0; }
    .j-body .align-left, .j-body img[style*="float: left"], .j-body figure[style*="float: left"] { margin-left: 0; }
    .j-body .align-right, .j-body img[style*="float: right"], .j-body figure[style*="float: right"] { margin-right: 0; }
}

@media (max-width: 640px) {
    .journal-page { padding-top: 36px; }
    .j-grid { grid-template-columns: 1fr; gap: 40px; }
    .j-card-lead { margin-bottom: 44px; padding-bottom: 44px; }
    .j-article-head { padding: 40px 20px 28px; }
    .j-cover { padding: 0; margin-bottom: 40px; }
    .j-body { font-size: 17px; line-height: 1.8; padding: 0 20px; }
    .j-body blockquote { font-size: 23px; padding-left: 20px; }
    .j-body h2 { font-size: 28px; }
    .j-body h3 { font-size: 23px; }
    .j-body .align-left, .j-body .align-right,
    .j-body img[style*="float"], .j-body figure[style*="float"] { float: none; max-width: 100%; margin: 1.6em auto; }
    .j-body > p:first-child::first-letter { font-size: 3.8em; }
    .j-related { padding: 56px 0 64px; }
}
