/* ============================================
   THE METTĀ VIEW, THEME PAGES AND PODCASTS
   (October 2026). Every class starts with "pub-".
   Tune the variables below live via Ghost code injection.
   ============================================ */

:root {
    --pub-ink: #1a1918;
    --pub-ink-soft: #4a4744;
    --pub-muted: #6b6762;
    --pub-rule: #d9d5ce;
    --pub-signup: #D1DCCB;          /* Mettā View sign-up band */
    --pub-subbar: #D6DFF1;          /* podcasts subscribe bar */
    --pub-a-ink: #FFFFFF;           /* text on the large tile (burgundy) */
    --pub-a-chev: brightness(0) invert(1); /* chevron on the large tile: white */
    --pub-band-strength: 55%;       /* how strong theme colours are on full-width theme bands */
}

/* Wider, white pages for the publication templates (no paper grain) */
html body.page-the-metta-view,
html body.page-podcasts,
html body.tag-storytelling, html body.tag-values, html body.tag-practice,
html body.tag-strategy, html body.tag-authority, html body.tag-mindfulness,
html body.tag-creativity, html body.tag-communication, html body.tag-making-things-happen,
html body.tag-essay, html body.tag-news, html body.tag-events, html body.tag-podcasts,
html body.tag-out-of-the-clouds, html body.tag-the-metta-interview,
html body:has(.pub-page) { background: #FFFFFF !important; }
html:has(.pub-page)::before { display: none; }
.site-main:has(.pub-page) { max-width: 1200px; }

/* Subscribe button, top right of The Mettā View masthead */
.pub-masthead { position: relative; }
.pub-page a.pub-subscribe-btn {
    position: absolute;
    top: 1.5rem;
    right: 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 4px;
    background: #A82841;
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
}
.pub-page a.pub-subscribe-btn:hover { background: #8e2137; }
@media (max-width: 760px) {
    .pub-page a.pub-subscribe-btn { position: static; margin: 0 0 24px; }
}

/* Theme page titles always start with a capital, whatever the tag's spelling */
.pub-band-title::first-letter { text-transform: uppercase; }

.pub-page { color: var(--pub-ink); }
.pub-page a { color: var(--pub-ink); }

.pub-label {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pub-muted);
}

/* Chevrons (your arrow artwork) */
.pub-chev-r, .pub-chev-l {
    display: inline-block;
    height: 0.6em;
    width: auto;
    vertical-align: 0.05em;
}
.pub-chev-r { margin-left: 0.45em; }
.pub-chev-l { margin-right: 0.45em; }
.pub-chev-r--light { filter: brightness(0) invert(1); }

.pub-link {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
}
.pub-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.pub-chevlink {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
}
.pub-chevlink img { height: 14px; width: auto; margin: 0; vertical-align: middle; }

/* --- Masthead --- */
.pub-masthead { padding: 1.5rem 0 1.75rem; }
.pub-masthead--compact { padding-bottom: 2.5rem; }
.pub-logo { display: block; height: 40px; width: auto; margin: 0 0 20px; }
.pub-title {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 2.2rem;
    line-height: 1.1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.pub-standfirst {
    max-width: 720px;
    margin: 24px 0 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1.25rem, 2.2vw, 1.625rem);
    line-height: 1.4;
}
.pub-pod-title {
    margin: 14px 0 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 2.2rem;
    line-height: 1.1;
}

/* --- Descriptor above the mosaic, facade text below it --- */
.pub-descriptor {
    max-width: 760px;
    margin: 0 0 40px;
}
.pub-descriptor p {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.6;
    color: var(--pub-ink-soft);
}
.pub-facade {
    max-width: 720px;
    margin: 0 0 56px;
}
.pub-facade p {
    margin: 0 0 16px;
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.6;
    color: var(--pub-ink-soft);
}

/* --- Theme mosaic --- */
.pub-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(150px, auto));
    gap: 20px;
    margin: 0 0 56px;
}
.pub-page a.pub-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 22px 24px;
    border-radius: 8px;
    background: var(--tile);
    color: var(--pub-ink);
    text-decoration: none;
    transition: filter 0.2s ease;
}
.pub-page a.pub-tile:hover { filter: brightness(0.97); }
.pub-tile-title {
    margin: 0 0 8px;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.1;
}
.pub-tile-blurb {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.45;
}
.pub-more {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
}

/* Layout (4 columns x 4 rows):
   Storytelling  Storytelling  Values         Practice
   Storytelling  Storytelling  Strategy       Practice
   Mindfulness   Creativity    Strategy       Authority
   Mindfulness   Making…       Communication  Communication */

/* Large tile (pinned: Storytelling) */
.pub-tile--a { grid-area: 1 / 1 / 3 / 3; }
.pub-page a.pub-tile--a { padding: 36px 40px; color: var(--pub-a-ink); }
.pub-tile--a .pub-chev-r { filter: var(--pub-a-chev); }
.pub-tile--a .pub-tile-title { font-weight: 300; font-size: 44px; line-height: 1.05; margin-bottom: 14px; }
.pub-tile--a .pub-tile-blurb { max-width: 460px; font-family: var(--font-serif); font-weight: 300; font-size: 20px; }

/* Wide tile (pinned: Communication) */
.pub-tile--h { grid-area: 4 / 3 / 5 / 5; }
.pub-page a.pub-tile--h { padding: 26px 32px; }
.pub-tile--h .pub-tile-title { font-weight: 300; font-size: 32px; margin-bottom: 10px; }
.pub-tile--h .pub-tile-blurb { max-width: 440px; font-family: var(--font-serif); font-weight: 300; font-size: 18px; }

/* The other seven, each in its fixed slot (drift = parallax amount) */
.pub-tile--b { grid-area: 1 / 3 / 2 / 4; --d: 28px; }  /* Values */
.pub-tile--c { grid-area: 1 / 4 / 3 / 5; --d: 20px; }  /* Practice */
.pub-tile--d { grid-area: 2 / 3 / 4 / 4; --d: 12px; }  /* Strategy */
.pub-tile--e { grid-area: 3 / 4 / 4 / 5; --d: 24px; }  /* Authority */
.pub-tile--f { grid-area: 3 / 1 / 5 / 2; --d: 24px; }  /* Mindfulness */
.pub-tile--g { grid-area: 3 / 2 / 4 / 3; --d: 16px; }  /* Creativity */
.pub-tile--i { grid-area: 4 / 2 / 5 / 3; --d: 20px; }  /* Making things happen */
.pub-tile--a { --d: 12px; }
.pub-tile--h { --d: 8px; }

/* Gentle parallax: each tile drifts at its own pace while scrolling.
   Off on smaller screens, for reduced-motion users, and in browsers without support. */
@keyframes pub-drift {
    from { transform: translateY(var(--d, 0px)); }
    to { transform: translateY(calc(var(--d, 0px) * -1)); }
}
@supports (animation-timeline: view()) {
    @media (min-width: 1101px) and (prefers-reduced-motion: no-preference) {
        .pub-mosaic > .pub-tile {
            animation: pub-drift linear both;
            animation-timeline: view();
            animation-range: entry 0% exit 100%;
        }
    }
}

/* --- Sign-up band --- */
.pub-signup { margin: 0 0 96px; background: var(--pub-signup); }
.pub-signup-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px 64px;
    padding: 56px 40px;
}
.pub-signup-form {
    flex: 1 1 260px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pub-signup-label {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.pub-signup-input {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--pub-ink);
    border-radius: 0;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--pub-ink);
}
.pub-signup-btn {
    align-self: flex-start;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--pub-ink);
    background: none;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pub-ink);
    cursor: pointer;
}
.pub-signup-line {
    flex: 999 1 380px;
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    line-height: 1.3;
    text-transform: uppercase;
}

/* --- By format --- */
.pub-formats { margin: 0 0 96px; }
.pub-formats-row {
    display: flex;
    flex-wrap: wrap;
    margin-top: 16px;
    border-top: 1px solid var(--pub-rule);
}
.pub-page .pub-formats-row a {
    flex: 1 1 220px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px 32px 24px 0;
    border-bottom: 1px solid var(--pub-rule);
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 28px;
    text-decoration: none;
}
.pub-formats-row .pub-chev-r { height: 18px; }

/* --- Post lists --- */
.pub-list { margin: 0 0 96px; }
.pub-list-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--pub-ink);
}
.pub-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 40px;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--pub-rule);
}
.pub-row-meta {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--pub-muted);
}
.pub-row-title {
    margin: 0 0 10px;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 28px;
    line-height: 1.15;
}
.pub-page .pub-row-title a { text-decoration: none; }
.pub-page .pub-row-title a:hover { text-decoration: underline; text-underline-offset: 5px; }
.pub-row-excerpt {
    max-width: 680px;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.55;
    color: var(--pub-ink-soft);
}
.pub-row-arrow { justify-self: end; padding-top: 10px; }
.pub-format { color: var(--pub-ink); }
.pub-row-listen { margin-top: 6px; }
/* No double rule where a list meets the next section */
.pub-list > .pub-row:last-of-type { border-bottom: 0; }
.pub-row-arrow img { height: 18px; width: auto; }
.pub-empty { padding: 32px 0; color: var(--pub-muted); }
.pub-older, .pub-back { margin: 32px 0 0; }

/* --- About --- */
.pub-about {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 72px;
    margin: 0 0 64px;
    padding-top: 40px;
    border-top: 1px solid var(--pub-ink);
}
.pub-about-head { flex: 1 1 200px; }
.pub-about-title {
    margin: 16px 0 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 36px;
    line-height: 1.15;
}
.pub-about-body {
    flex: 3 1 480px;
    max-width: 720px;
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.65;
}
.pub-about-body p { margin: 0 0 20px; }

/* --- Theme page band --- */
/* Default colour per theme, used until the tag's Accent colour is set in Ghost */
.pub-band { --tile: #F9EEDC; }
.pub-band--storytelling { --tile: #A82841; }
.pub-band--values { --tile: #F4C3CC; }
.pub-band--practice { --tile: #C8BBAD; }
.pub-band--strategy { --tile: #D1DCD8; }
.pub-band--authority { --tile: #E7E2DE; }
.pub-band--mindfulness { --tile: #8DAE81; }
.pub-band--creativity { --tile: #F9EEDC; }
.pub-band--communication { --tile: #FFD200; }
.pub-band--making-things-happen { --tile: #84A5DA; }
.pub-band--essay { --tile: #D6DFF1; --pub-band-strength: 100%; }        /* soft Mettā View blue */
.pub-band--news-events, .pub-band--news, .pub-band--events { --tile: #F8EBED; --pub-band-strength: 100%; }  /* Mettā View pink */
.pub-band {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 0 0 64px;
    padding: 56px 40px 40px;
    background: color-mix(in srgb, var(--tile) var(--pub-band-strength), #FFFFFF);
}
.pub-band-title {
    margin: 0 0 20px;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 2.2rem;
    line-height: 1.1;
}
.pub-band-blurb {
    max-width: 820px;
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1.3rem, 2.4vw, 1.875rem);
    line-height: 1.45;
}
.pub-band-image {
    align-self: flex-end;
    width: min(100%, 640px);
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* --- Podcasts --- */
.pub-shows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 0 0 96px;
}
.pub-show {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 36px;
    background: var(--tile);
}
.pub-show-art { width: 100%; max-width: 320px; aspect-ratio: 1 / 1; object-fit: cover; }
.pub-show-title {
    margin: 0 0 14px;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 36px;
    line-height: 1.08;
}
.pub-show-blurb {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 19px;
    line-height: 1.5;
}
.pub-page a.pub-btn {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 14px 22px;
    border-radius: 4px;
    background: var(--pub-ink);
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
}
.pub-show--wide { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 32px 48px; }
.pub-show--wide .pub-show-art { flex: 0 1 280px; }
.pub-show-body { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; }
.pub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.pub-wh { margin: 0 0 96px; }
.pub-wh > .pub-label { margin-bottom: 16px; }
.pub-meditations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.pub-meditation {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--pub-ink);
}
.pub-meditation-meta { margin: 0; font-family: var(--font-sans); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pub-muted); }
.pub-meditation-title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.2; }

.pub-subbar {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 64px;
    margin: 0 0 64px;
    padding: 48px 40px;
    background: var(--pub-subbar);
}
.pub-subbar-head { flex: 1 1 220px; }
.pub-subbar-title { margin: 0 0 10px; font-family: var(--font-serif); font-weight: 300; font-size: 32px; line-height: 1.15; }
.pub-subbar-head p { margin: 0; font-family: var(--font-sans); font-size: 17px; }
.pub-subbar-shows { flex: 3 1 520px; display: flex; flex-wrap: wrap; gap: 24px; }
.pub-subbar-shows > div { flex: 1 1 160px; }
.pub-subbar-show { margin: 0 0 8px; font-family: var(--font-serif); font-weight: 400; font-size: 21px; line-height: 1.2; }

.pub-filters { display: flex; flex-wrap: wrap; gap: 20px; }
.pub-page .pub-filters a { font-family: var(--font-sans); font-size: 15px; text-decoration: none; }
.pub-page .pub-filters a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

.pub-ep {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 36px;
    padding: 36px 0;
    border-bottom: 1px solid var(--pub-rule);
}
.pub-ep-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pub-ep-show { margin: 0; font-family: var(--font-sans); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pub-muted); }
.pub-ep-title { margin: 12px 0 8px; font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.pub-page .pub-ep-title a { text-decoration: none; }
.pub-ep-on { margin: 0 0 12px; font-family: var(--font-serif); font-weight: 300; font-size: 21px; line-height: 1.35; }
.pub-ep-blurb {
    max-width: 640px;
    margin: 0 0 12px;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--pub-ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pub-ep-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

/* --- Smaller screens --- */
@media (max-width: 1100px) {
    .pub-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
    .pub-mosaic > .pub-tile { grid-area: auto !important; min-height: 180px; }
    .pub-mosaic > .pub-tile--a,
    .pub-mosaic > .pub-tile--h { grid-column: 1 / -1 !important; }
}
@media (max-width: 760px) {
    .pub-shows { grid-template-columns: minmax(0, 1fr); }
    .pub-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .pub-row-arrow { display: none; }
    .pub-ep { grid-template-columns: 110px minmax(0, 1fr); gap: 18px; }
    .pub-signup-inner, .pub-band, .pub-subbar { padding-left: 24px; padding-right: 24px; }
    .pub-page a.pub-tile--a { padding: 28px; }
    .pub-tile--a .pub-tile-title { font-size: 36px; }
}
@media (max-width: 560px) {
    .pub-mosaic { grid-template-columns: minmax(0, 1fr); }
}

/* Podcast episode pages: show the episode artwork square and whole */
body.post-template.tag-podcasts .post-feature-image img {
    width: min(100%, 520px);
    max-height: none;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Podcast episode pages: the "On…" line in black, upright */
body.post-template.tag-podcasts .post-deck {
    font-style: normal;
    color: var(--color-text);
}
