/*
Written by Milcho Manchevski CPT CSS
------------------------------------
Uses the existing Art/Book visual system and adds only CPT-specific refinements.
*/

.msp-written-archive .msp-written-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
}

.msp-written-archive .msp-written-filter a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 9px 13px;
  border: 1px solid rgba(200,164,93,.38);
  color: var(--msp-gold, #c8a45d);
  background: rgba(200,164,93,.06);
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}

.msp-written-archive .msp-written-filter a:hover,
.msp-written-archive .msp-written-filter a.is-active {
  background: var(--msp-gold, #c8a45d);
  color: #070707;
}

.msp-written-page .msp-film-credit-line {
  margin-top: 12px;
}

.msp-written-page .msp-written-custom-section .msp-book-section-text {
  color: var(--msp-muted, #b8aea0);
  font-size: 17px;
  line-height: 1.72;
}

.msp-written-page .msp-written-custom-section .msp-book-section-text p:first-child {
  margin-top: 0;
}

.msp-written-page .msp-written-custom-section .msp-book-section-text p:last-child {
  margin-bottom: 0;
}


/* v14.1 Written contents / pieces list */
.msp-written-contents {
  display: grid;
  gap: 26px;
}

.msp-written-contents-intro {
  max-width: 860px;
}

.msp-written-pieces {
  display: grid;
  gap: 34px;
}

.msp-written-piece {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--msp-line, rgba(255,255,255,.12));
}

.msp-written-piece:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.msp-written-piece h3 {
  margin: 0 0 16px;
  color: var(--msp-text, #f7f1e8);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: normal;
}

.msp-written-piece h3 span {
  color: var(--msp-muted, rgba(255,255,255,.68));
  font-family: inherit;
  font-size: .62em;
  font-weight: 400;
}

.msp-written-piece-year {
  margin-top: -8px;
  margin-bottom: 16px;
  color: var(--msp-muted, rgba(255,255,255,.64));
  font-size: 14px;
}

.msp-written-piece-published,
.msp-written-piece-downloads {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  color: var(--msp-muted, rgba(255,255,255,.72));
  font-size: 16px;
  line-height: 1.5;
}

.msp-written-piece-published strong,
.msp-written-piece-downloads strong {
  color: var(--msp-text, #f7f1e8);
  font-weight: 700;
}

.msp-written-piece-published p {
  margin: 0;
}

.msp-written-piece-downloads div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.msp-written-piece-downloads a,
.msp-written-piece-downloads span {
  color: var(--msp-gold, #c8a45d);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.msp-written-piece-downloads a:hover {
  color: var(--msp-text, #f7f1e8);
}

.msp-written-piece-note {
  margin-top: 14px;
}

@media (max-width: 700px) {
  .msp-written-pieces {
    gap: 28px;
  }
}


/* v14.3 Written downloads + archive meta cleanup */
.msp-written-downloads {
  display: grid;
  gap: 12px;
  max-width: 780px;
}

.msp-written-download-item {
  display: grid;
  gap: 5px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--msp-line, rgba(255,255,255,.12));
  background: transparent;
  color: var(--msp-gold, #c8a45d) !important;
  text-decoration: none;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.msp-written-download-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.msp-written-download-item span {
  display: inline;
  width: fit-content;
  color: var(--msp-gold, #c8a45d);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.msp-written-download-item em {
  display: block;
  color: var(--msp-muted, rgba(255,255,255,.62));
  font-style: normal;
  font-size: 14px;
  line-height: 1.4;
}

.msp-written-download-item:hover span {
  color: var(--msp-text, #f7f1e8);
}


/* v14.7 Written archive image logic + custom details */
.msp-written-archive.no-images .msp-book-archive-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.msp-written-archive.no-images .msp-book-archive-card {
  display: block;
  background: rgba(255,255,255,.025);
}

.msp-written-archive.no-images .msp-book-archive-body {
  padding: 22px 24px;
}

.msp-written-archive.no-images .msp-book-archive-body h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  margin-bottom: 8px;
}

.msp-written-archive.no-images .msp-book-archive-body p {
  max-width: 760px;
}

.msp-written-archive.has-images .msp-written-archive-card:not(:has(.msp-book-archive-cover)) {
  grid-template-rows: 1fr;
}

.msp-written-custom-details {
  display: grid;
  gap: 28px;
}

.msp-written-custom-detail {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--msp-line, rgba(255,255,255,.12));
}

.msp-written-custom-detail:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.msp-written-custom-detail h3 {
  margin: 0 0 12px;
  color: var(--msp-text, #f7f1e8);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: normal;
}

.msp-written-custom-detail-text {
  color: var(--msp-muted, #b8aea0);
  font-size: 17px;
  line-height: 1.72;
}

.msp-written-custom-detail-text p:first-child {
  margin-top: 0;
}

.msp-written-custom-detail-text p:last-child {
  margin-bottom: 0;
}

.msp-written-custom-detail-links {
  margin-top: 16px;
}


/* v15.9 Written hero fixed background */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .msp-ab-hero.msp-ab-hero--image,
  .msp-ab-hero.msp-ab-hero--image::before,
  .msp-bio-hero,
  .msp-home-hero {
    background-attachment: fixed !important;
  }
}
@media (max-width: 980px), (prefers-reduced-motion: reduce) {
  .msp-ab-hero.msp-ab-hero--image,
  .msp-ab-hero.msp-ab-hero--image::before,
  .msp-bio-hero,
  .msp-home-hero {
    background-attachment: scroll !important;
  }

.msp-film-archive h1,
.msp-book-archive h1,
.msp-art-archive h1,
.msp-written-archive h1,
.msp-ab-archive h1,
body.post-type-archive-film .msp-film-archive h1,
body.post-type-archive-book .msp-film-archive h1,
body.post-type-archive-art .msp-film-archive h1,
body.post-type-archive-written_work .msp-film-archive h1,
body.tax-written_type .msp-film-archive h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 10vw, 48px) !important;
  line-height: .9;
  letter-spacing: -.055em;
  font-weight: 400;
  margin: 0 0 50px;
}



}


/* v18.0 Section title size + gold text links */
.msp-section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 36px);
  line-height: .95;
  letter-spacing: normal;
  margin: 0;
}

.msp-film-section a:not(.msp-button),
.msp-ab-section a:not(.msp-button),
.msp-written-section a:not(.msp-button),
.msp-bio-section a:not(.msp-button),
.msp-content a:not(.msp-button),
.msp-rich-text a:not(.msp-button),
.msp-film-full-credits-text a:not(.msp-button),
.msp-film-credit-value a:not(.msp-button),
.msp-film-book-note a:not(.msp-button),
.msp-written-piece-note a:not(.msp-button),
.msp-written-content a:not(.msp-button) {
  color: var(--msp-gold, #c9a45c);
  text-decoration-color: currentColor;
  text-underline-offset: 0.18em;
}

.msp-film-section a:not(.msp-button):hover,
.msp-ab-section a:not(.msp-button):hover,
.msp-written-section a:not(.msp-button):hover,
.msp-bio-section a:not(.msp-button):hover,
.msp-content a:not(.msp-button):hover,
.msp-rich-text a:not(.msp-button):hover,
.msp-film-full-credits-text a:not(.msp-button):hover,
.msp-film-credit-value a:not(.msp-button):hover,
.msp-film-book-note a:not(.msp-button):hover,
.msp-written-piece-note a:not(.msp-button):hover,
.msp-written-content a:not(.msp-button):hover {
  color: var(--msp-gold, #c9a45c);
  opacity: .82;
}


/* v18.4 Archive H1 size - Films / Books / Art / Written */
.msp-film-archive h1,
.msp-book-archive h1,
.msp-art-archive h1,
.msp-written-archive h1,
.msp-ab-archive h1,
body.post-type-archive-film .msp-film-archive h1,
body.post-type-archive-book .msp-film-archive h1,
body.post-type-archive-art .msp-film-archive h1,
body.post-type-archive-written_work .msp-film-archive h1,
body.tax-written_type .msp-film-archive h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(62px, 10vw, 68px);
  line-height: .9;
  letter-spacing: -.055em;
  font-weight: 400;
  margin: 0 0 50px;
}


/* v19.8.7 Vimeo thumbnail fallback */
.msp-film-video-trigger {
  background:
    radial-gradient(circle at center, rgba(201,164,92,.16), transparent 34%),
    linear-gradient(135deg, #1b130f, #16110d 48%, #050505);
}

.msp-film-video-trigger img {
  min-height: 240px;
  object-fit: cover;
}


/* v19.8.8 Local video support */
.msp-lightbox__video video,
.msp-film-video-embed video {
  width: 100%;
  max-width: 100%;
  max-height: 78vh;
  height: auto;
  display: block;
  background: #000;
}

.msp-film-video-trigger video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* v19.9.4 Written Press & Essays font size fix */
body .msp-written-page .msp-written-press-card h3,
body .msp-written-page .msp-book-press-card.msp-written-press-card h3 {
  margin: 0 !important;
  color: var(--msp-text, #f7f1e8) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(17px, 1.05vw, 20px) !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
}

body .msp-written-page .msp-written-press-card .msp-book-press-type {
  margin-bottom: 8px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  letter-spacing: .12em !important;
}

body .msp-written-page .msp-written-press-card .msp-book-press-meta,
body .msp-written-page .msp-written-press-card .msp-book-press-note {
  font-size: 14px !important;
  line-height: 1.55 !important;
}

body .msp-written-page .msp-written-press-card {
  padding: 18px 0 !important;
}




/* v19.9.8 Written by Milcho piece h3 size */
.msp-written-piece h3 {
  font-size: clamp(24px, 2.4vw, 28px) !important;
}


/* v20.1.0 MOV browser sniff + fallback */
.msp-video-player-fallback {
  margin-top: 12px;
  color: rgba(255,255,255,.76);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.msp-video-player-fallback a {
  color: var(--msp-gold, #c9a45c);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
