/*
Theme Name: Barry Zeve
Theme URI: https://barryzeve.com/
Author: BarryZeve.com
Description: A calm, editorial WordPress theme created for Barry Emanuel Zeve's books, videos, essays, and spiritual work.
Version: 1.0.4
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: barry-zeve
*/

:root {
  --bz-ink: #201d2a;
  --bz-muted: #6e6876;
  --bz-paper: #fbf8f2;
  --bz-white: #ffffff;
  --bz-line: rgba(41, 31, 57, 0.13);
  --bz-plum: #4e315e;
  --bz-plum-dark: #30203b;
  --bz-gold: #c59a46;
  --bz-gold-soft: #f2e5c7;
  --bz-rose: #9f3d68;
  --bz-teal: #397779;
  --bz-shadow: 0 24px 60px rgba(42, 29, 51, 0.12);
  --bz-radius: 20px;
  --bz-content: 760px;
  --bz-wide: 1180px;
  --bz-serif: Georgia, "Times New Roman", serif;
  --bz-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--bz-ink);
  background: var(--bz-paper);
  font-family: var(--bz-sans);
  font-size: 17px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  height: 4px;
  background: linear-gradient(90deg, #b64159, #d9823b, #d7b945, #5d9b68, #4b82a9, #67549c, #9b477b);
}
img { max-width: 100%; height: auto; }
a { color: var(--bz-plum); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--bz-rose); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(197, 154, 70, 0.65); outline-offset: 3px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important; top: 12px; left: 12px; z-index: 10000;
  width: auto; height: auto; clip: auto; padding: 10px 14px;
  color: var(--bz-white); background: var(--bz-plum-dark); border-radius: 8px;
}

.bz-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--bz-line);
  background: rgba(251, 248, 242, 0.94);
  backdrop-filter: blur(18px);
}
.admin-bar .bz-site-header { top: 32px; }
.bz-header-inner {
  width: min(calc(100% - 40px), var(--bz-wide));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.bz-brand { display: inline-flex; flex-direction: column; color: var(--bz-ink); text-decoration: none; line-height: 1; }
.bz-brand-name { font-family: var(--bz-serif); font-size: clamp(1.55rem, 2.4vw, 2.15rem); letter-spacing: -0.035em; }
.bz-brand-tagline { margin-top: 8px; color: var(--bz-muted); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.bz-menu-toggle {
  display: none;
  width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--bz-line); border-radius: 50%;
  color: var(--bz-ink); background: var(--bz-white); cursor: pointer;
}
.bz-menu-toggle span,
.bz-menu-toggle::before,
.bz-menu-toggle::after {
  content: ""; display: block; width: 19px; height: 2px; margin: 4px auto; background: currentColor; transition: transform .2s ease, opacity .2s ease;
}
.bz-menu-toggle[aria-expanded="true"] span { opacity: 0; }
.bz-menu-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.bz-menu-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }
.bz-primary-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.bz-primary-nav a {
  display: block; padding: 11px 13px; border-radius: 999px;
  color: var(--bz-ink); text-decoration: none; font-size: 0.88rem; font-weight: 700;
}
.bz-primary-nav a:hover,
.bz-primary-nav .current-menu-item > a,
.bz-primary-nav .current_page_item > a { color: var(--bz-plum); background: var(--bz-gold-soft); }

.bz-main { min-height: 65vh; }
.bz-shell { width: min(calc(100% - 40px), var(--bz-wide)); margin-inline: auto; }
.bz-content-shell { width: min(calc(100% - 40px), var(--bz-content)); margin-inline: auto; }
.bz-page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 2.8vw, 38px) 0 clamp(22px, 2.5vw, 34px);
  color: var(--bz-white);
  background:
    radial-gradient(circle at 84% 8%, rgba(197,154,70,.2), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(159,61,104,.16), transparent 32%),
    linear-gradient(135deg, #382940, #533a5a 64%, #604556);
}
.bz-page-hero::after {
  content: "✦";
  position: absolute; right: max(5vw, 20px); top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,.055); font-family: var(--bz-serif); font-size: clamp(5rem, 13vw, 11rem); line-height: 1;
}
.bz-page-hero-inner { position: relative; z-index: 1; width: min(calc(100% - 40px), var(--bz-wide)); margin: 0 auto; }
.bz-kicker { display: block; margin-bottom: 8px; color: #f1d79f; font-size: .69rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.bz-page-title { max-width: 900px; margin: 0; font-family: var(--bz-serif); font-size: clamp(2.05rem, 4vw, 3.6rem); font-weight: 400; line-height: 1.02; letter-spacing: -.04em; }
.bz-page-intro { max-width: 720px; margin: 14px 0 0; color: rgba(255,255,255,.77); font-size: 1rem; line-height: 1.55; }

.bz-entry-wrap { padding: clamp(28px, 3.8vw, 52px) 0 clamp(48px, 7vw, 90px); }
.entry-content { overflow-wrap: anywhere; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content p { margin: 0 0 1.35em; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { margin: 1.7em 0 .65em; color: var(--bz-plum-dark); font-family: var(--bz-serif); font-weight: 400; line-height: 1.15; letter-spacing: -.025em; }
.entry-content h2 { font-size: clamp(2rem, 5vw, 3rem); }
.entry-content h3 { font-size: clamp(1.45rem, 3vw, 2rem); }
.entry-content blockquote {
  margin: 2.2em 0; padding: 1.2em 1.4em;
  border-left: 4px solid var(--bz-gold); border-radius: 0 var(--bz-radius) var(--bz-radius) 0;
  color: var(--bz-plum-dark); background: var(--bz-white); box-shadow: 0 12px 35px rgba(48,32,59,.06);
  font-family: var(--bz-serif); font-size: 1.2em;
}
.entry-content hr { margin: 3em 0; border: 0; border-top: 1px solid var(--bz-line); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content iframe { max-width: 100%; }
.entry-content .aligncenter { display: block; margin: 2em auto; }
.entry-content .alignleft { float: left; margin: .45em 2em 1.2em 0; }
.entry-content .alignright { float: right; margin: .45em 0 1.2em 2em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { margin-top: .5rem; color: var(--bz-muted); font-size: .83rem; text-align: center; }

.home .bz-home-masthead {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 3.2vw, 44px) 0 clamp(34px, 3.5vw, 46px);
  color: var(--bz-white);
  background:
    radial-gradient(circle at 82% 16%, rgba(232,194,111,.2), transparent 25%),
    radial-gradient(circle at 16% 86%, rgba(194,83,126,.16), transparent 28%),
    linear-gradient(142deg, #30233a, #503657 62%, #604353);
}
.home .bz-home-masthead::after {
  content: "🙏  🕉️  ✡️  ☸️  ☯️  ✝️  ☪️";
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: 100%; color: rgba(255,255,255,.11); font-size: clamp(.85rem, 1.8vw, 1.3rem); letter-spacing: .24em; text-align: center; white-space: nowrap;
}
.bz-home-title { max-width: 900px; margin: 0; font-family: var(--bz-serif); font-size: clamp(2.9rem, 5.1vw, 4.9rem); font-weight: 400; line-height: .88; letter-spacing: -.055em; }
.bz-home-title span { display: inline; margin-left: .12em; color: #ecd49f; }
.bz-home-tagline { max-width: 660px; margin: 14px 0 0; color: rgba(255,255,255,.74); font-size: clamp(.96rem, 1.35vw, 1.1rem); }
.home .bz-entry-wrap { padding-top: clamp(28px, 3.5vw, 46px); }
.home .entry-content { width: min(100%, 900px); margin: 0 auto; font-family: var(--bz-serif); font-size: clamp(1.08rem, 1.7vw, 1.22rem); line-height: 1.83; }
.home .entry-content > img:first-child {
  float: right; width: min(35vw, 310px); margin: .25em 0 1.8em 2.5em;
  border: 10px solid var(--bz-white); border-radius: 160px 160px 26px 26px; box-shadow: var(--bz-shadow);
}
.home .entry-content > img:last-child {
  width: 100%; margin-top: 3.5em; border: 10px solid var(--bz-white); border-radius: var(--bz-radius); box-shadow: var(--bz-shadow);
}
.home .entry-content p[style*="text-align: center"] { color: var(--bz-plum); font-size: 1.15em; font-style: italic; }

.bz-card-index { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; padding: 42px 0 90px; }
.bz-index-card {
  padding: 28px; border: 1px solid var(--bz-line); border-radius: var(--bz-radius);
  background: var(--bz-white); box-shadow: 0 15px 40px rgba(48,32,59,.06);
}
.bz-index-card h2 { margin: 0 0 10px; font-family: var(--bz-serif); font-weight: 400; line-height: 1.1; }
.bz-index-card h2 a { color: var(--bz-plum-dark); text-decoration: none; }
.bz-index-card p { color: var(--bz-muted); font-size: .95rem; }
.bz-index-card .bz-read-more { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; text-decoration: none; }

.bz-pagination { display: flex; justify-content: center; gap: 6px; margin: 10px 0 80px; }
.bz-pagination .page-numbers { min-width: 42px; padding: 8px 12px; border: 1px solid var(--bz-line); border-radius: 999px; background: var(--bz-white); text-align: center; text-decoration: none; }
.bz-pagination .current { color: var(--bz-white); background: var(--bz-plum); border-color: var(--bz-plum); }

.bz-book-single { padding: clamp(28px, 3.8vw, 52px) 0 clamp(48px, 7vw, 90px); }
.bz-book-overview { display: grid; grid-template-columns: minmax(250px, 380px) minmax(0,1fr); gap: clamp(36px, 7vw, 90px); align-items: center; }
.bz-book-art { position: relative; }
.bz-book-art img { width: 100%; border: 10px solid var(--bz-white); border-radius: 18px; box-shadow: var(--bz-shadow); }
.bz-book-art::before { content: ""; position: absolute; inset: 7% -7% -7% 7%; z-index: -1; border-radius: 24px; background: var(--bz-gold-soft); }
.bz-book-copy .bz-kicker { color: var(--bz-rose); }
.bz-book-copy h1 { margin: 0; color: var(--bz-plum-dark); font-family: var(--bz-serif); font-size: clamp(2.7rem, 6vw, 5.2rem); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.bz-book-subtitle { max-width: 680px; margin: 22px 0; color: var(--bz-muted); font-size: 1.1rem; }
.bz-book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.bz-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 20px;
  border: 1px solid var(--bz-plum); border-radius: 999px; color: var(--bz-white); background: var(--bz-plum); font-size: .88rem; font-weight: 800; text-decoration: none;
}
.bz-button:hover { color: var(--bz-white); background: var(--bz-rose); border-color: var(--bz-rose); }
.bz-button-secondary { color: var(--bz-plum); background: transparent; }
.bz-button-secondary:hover { color: var(--bz-white); }
.bz-book-description { width: min(100%, var(--bz-content)); margin: 64px auto 0; }
.bz-reader-section { margin-top: clamp(50px, 8vw, 90px); padding-top: clamp(48px, 7vw, 78px); border-top: 1px solid var(--bz-line); }
.bz-reader-heading { margin: 0 0 24px; font-family: var(--bz-serif); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400; }


.bz-lightbox-open { overflow: hidden; }
.bz-cover-lightbox {
  position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 18px; opacity: 0; transition: opacity .18s ease;
}
.bz-cover-lightbox[hidden] { display: none; }
.bz-cover-lightbox.is-open { opacity: 1; }
.bz-cover-lightbox-backdrop { position: absolute; inset: 0; background: rgba(23, 16, 28, .9); backdrop-filter: blur(8px); }
.bz-cover-lightbox-dialog {
  position: relative; z-index: 1; display: flex; flex-direction: column; width: min(96vw, 1320px); max-height: calc(100vh - 36px);
  overflow: hidden; border: 1px solid rgba(255,255,255,.17); border-radius: 18px; background: #18131d; box-shadow: 0 28px 90px rgba(0,0,0,.5);
}
.bz-cover-lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 14px 12px 20px; color: #fff; background: #30203b; }
.bz-cover-lightbox-toolbar h2 { margin: 0; color: inherit; font-family: var(--bz-serif); font-size: clamp(1rem, 2.2vw, 1.35rem); font-weight: 400; line-height: 1.2; }
.bz-cover-lightbox-close {
  flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; color: #fff; background: rgba(255,255,255,.08); font-size: 1.85rem; line-height: 1; cursor: pointer;
}
.bz-cover-lightbox-close:hover, .bz-cover-lightbox-close:focus-visible { background: rgba(255,255,255,.18); }
.bz-cover-lightbox-canvas { display: grid; place-items: center; min-height: 0; overflow: auto; padding: clamp(14px, 2.5vw, 30px); background: #0f0c12; }
.bz-cover-lightbox-image {
  display: block; width: auto; max-width: min(90vw, 1180px); height: auto; max-height: calc(100vh - 170px); border-radius: 4px; box-shadow: 0 18px 65px rgba(0,0,0,.48); cursor: zoom-in;
}
.bz-cover-lightbox-image.is-zoomed { max-width: none; max-height: none; cursor: zoom-out; }
.bz-cover-lightbox-help { margin: 0; padding: 9px 18px 11px; color: rgba(255,255,255,.68); background: #251a2e; font-size: .76rem; text-align: center; }

.bz-video-frame { position: relative; overflow: hidden; aspect-ratio: 16/9; margin: 2em 0; border-radius: var(--bz-radius); background: #18131d; box-shadow: var(--bz-shadow); }
.bz-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.page-id-816 .entry-content > p:has(iframe) { margin: 2.3em 0; }
.page-id-888 .entry-content > p { margin: 12px 0; }
.page-id-888 .entry-content > p a {
  display: block; padding: 16px 20px; border: 1px solid var(--bz-line); border-radius: 14px;
  background: var(--bz-white); font-weight: 700; text-decoration: none; box-shadow: 0 9px 24px rgba(48,32,59,.045);
}

.bz-not-found { max-width: 720px; margin: 0 auto; padding: 100px 20px; text-align: center; }
.bz-not-found h1 { margin: 0 0 16px; font-family: var(--bz-serif); font-size: clamp(3rem, 8vw, 6rem); font-weight: 400; }
.bz-search-form { display: flex; gap: 10px; max-width: 560px; margin: 28px auto 0; }
.bz-search-form label { flex: 1; }
.bz-search-form input { width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid var(--bz-line); border-radius: 999px; background: var(--bz-white); }
.bz-search-form button { min-height: 48px; padding: 10px 19px; border: 0; border-radius: 999px; color: var(--bz-white); background: var(--bz-plum); font-weight: 800; cursor: pointer; }

.bz-site-footer { margin-top: 20px; color: rgba(255,255,255,.75); background: #251a2e; }
.bz-footer-inner { width: min(calc(100% - 40px), var(--bz-wide)); margin: 0 auto; padding: 60px 0 34px; }
.bz-footer-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; align-items: end; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.12); }
.bz-footer-name { margin: 0; color: var(--bz-white); font-family: var(--bz-serif); font-size: clamp(2.3rem, 5vw, 4.5rem); font-weight: 400; line-height: .95; letter-spacing: -.045em; }
.bz-footer-symbols { margin-top: 18px; color: #d9bf87; letter-spacing: .18em; }
.bz-footer-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.bz-footer-nav a { color: rgba(255,255,255,.8); font-weight: 700; text-decoration: none; }
.bz-footer-nav a:hover { color: #f1d79f; }
.bz-footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 28px; color: rgba(255,255,255,.55); font-size: .78rem; }

@media (max-width: 960px) {
  .bz-menu-toggle { display: block; }
  .bz-primary-nav {
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
    padding: 12px 20px 22px; border-bottom: 1px solid var(--bz-line); background: var(--bz-paper); transition: .2s ease;
  }
  .bz-primary-nav.is-open { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
  .bz-primary-nav ul { display: grid; gap: 3px; }
  .bz-primary-nav a { padding: 13px 15px; }
  .bz-card-index { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bz-book-overview { grid-template-columns: minmax(210px, 300px) minmax(0,1fr); gap: 42px; }
}
@media (max-width: 782px) { .admin-bar .bz-site-header { top: 46px; } }
@media (max-width: 720px) {
  body { font-size: 16px; }
  .bz-header-inner { width: min(calc(100% - 28px), var(--bz-wide)); min-height: 76px; }
  .bz-brand-tagline { display: none; }
  .bz-page-hero-inner, .bz-shell, .bz-content-shell, .bz-footer-inner { width: min(calc(100% - 28px), var(--bz-wide)); }
  .bz-page-hero { padding: 24px 0 22px; }
  .bz-page-title { font-size: clamp(2.1rem, 10vw, 3.15rem); }
  .bz-page-hero::after { right: 10px; font-size: clamp(4.5rem, 25vw, 7rem); }
  .home .bz-home-masthead { padding: 34px 0 40px; }
  .home .bz-home-masthead::after { bottom: 8px; font-size: .76rem; letter-spacing: .1em; }
  .bz-home-title { font-size: clamp(3rem, 14vw, 4.5rem); }
  .bz-home-title span { display: block; margin-left: 0; }
  .home .entry-content > img:first-child { float: none; display: block; width: min(78vw, 310px); margin: 0 auto 2.1em; }
  .entry-content .alignleft, .entry-content .alignright { float: none; display: block; margin: 1.5em auto; }
  .bz-card-index { grid-template-columns: 1fr; padding-top: 38px; }
  .bz-book-overview { grid-template-columns: 1fr; }
  .bz-book-art { width: min(88%, 390px); margin: 0 auto; }
  .bz-book-copy { text-align: center; }
  .bz-book-copy .bz-kicker { text-align: center; }
  .bz-book-actions { justify-content: center; }
  .bz-footer-top { grid-template-columns: 1fr; }
  .bz-footer-nav ul { justify-content: flex-start; }
  .bz-footer-bottom { display: block; }
  .bz-footer-bottom span { display: block; margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* WordPress may wrap the first and final homepage images in paragraphs. */
.home .entry-content > p:first-child {
  float: right; width: min(35vw, 310px); margin: .25em 0 1.8em 2.5em;
}
.home .entry-content > p:first-child img {
  float: none; width: 100%; margin: 0;
  border: 10px solid var(--bz-white); border-radius: 160px 160px 26px 26px; box-shadow: var(--bz-shadow);
}
.home .entry-content > p:last-child img {
  width: 100%; margin-top: 3.5em; border: 10px solid var(--bz-white); border-radius: var(--bz-radius); box-shadow: var(--bz-shadow);
}
@media (max-width: 720px) {
  .home .entry-content > p:first-child { float: none; width: min(78vw, 310px); margin: 0 auto 2.1em; }
}
