/* Jacob Diamonds — blog (loaded after styles.css; also used by the "latest posts" block on the home page) */

html:has(body.is-blog) { --header-h: 70px; }
body.is-blog { padding-top: var(--header-h); }
body.is-blog .wa { opacity: 1; transform: none; pointer-events: auto; }
.header.is-scrolled { position: fixed; }

/* ---------- cards ---------- */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 36px); }
.pcard {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border: 1px solid var(--line);
  transition: transform .6s var(--ease), border-color .4s, box-shadow .6s var(--ease);
}
.pcard:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 28px 50px -32px rgba(17,17,17,.4); }
.pcard__img { position: relative; overflow: hidden; aspect-ratio: 1200 / 630; background: var(--sand); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.pcard:hover .pcard__img img { transform: scale(1.04); }
.pcard__cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 7% 8% 16%; text-align: right; color: #fff; pointer-events: none;
  background: linear-gradient(90deg, rgba(17,17,17,.1) 0%, rgba(17,17,17,.62) 100%), linear-gradient(0deg, rgba(17,17,17,.5) 0%, rgba(17,17,17,0) 45%);
}
.pcard__eyebrow { display: flex; justify-content: flex-start; align-items: center; gap: 10px; direction: ltr; flex-direction: row-reverse; align-self: stretch; font-family: 'Cormorant Garamond', serif; font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase; color: #E3CFA4; }
.pcard__eyebrow i { width: 6px; height: 6px; background: #E3CFA4; transform: rotate(45deg); display: inline-block; }
.pcard__covertitle { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.2; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.pcard__img .pcard__logo { position: absolute; left: 6%; bottom: 8%; width: clamp(52px, 5vw, 68px); height: auto; object-fit: contain; transform: none; transition: none; filter: brightness(0) invert(1); opacity: .92; }
.pcard:hover .pcard__img .pcard__logo { transform: none; }
.pcard__body { display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 26px; flex: 1; }
.pcard__body time { font-size: 13.5px; color: var(--muted); letter-spacing: .02em; }
.pcard__title { font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 1.7vw, 23px); line-height: 1.35; color: var(--ink); }
.pcard__body p { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__more { margin-top: auto; padding-top: 8px; font-size: 14.5px; font-weight: 500; color: var(--gold); display: inline-flex; gap: 8px; align-items: center; }
.pcard__more i { font-style: normal; transition: transform .4s var(--ease); }
.pcard:hover .pcard__more i { transform: translateX(-5px); }

.blog-latest { background: var(--paper); border-top: 1px solid var(--line); }
.blog-latest .sec-head__aside { align-self: end; justify-self: end; max-width: none; width: max-content; }

/* ---------- blog index ---------- */
.post--index { padding-bottom: clamp(80px, 10vw, 150px); }
.blog-head { padding-block: clamp(56px, 8vw, 110px) clamp(44px, 6vw, 80px); max-width: 860px; }
.blog-head__title { font-family: var(--serif); font-weight: 200; font-size: clamp(40px, 6vw, 82px); line-height: 1.08; margin-top: 22px; letter-spacing: -.01em; }
.blog-head__sub { margin-top: 24px; font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.8; color: var(--ink-2); max-width: 640px; }
.blog-empty { color: var(--muted); padding-block: 40px; }
.blog-h2 { font-family: var(--serif); font-weight: 200; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.15; margin-bottom: 40px; }

/* ---------- post ---------- */
.post__wrap { max-width: calc(780px + var(--gutter) * 2); margin-inline: auto; padding: clamp(36px, 5vw, 64px) var(--gutter) 0; }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.post__head { margin-top: 34px; }
.post__title { font-family: var(--serif); font-weight: 200; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.18; letter-spacing: -.005em; margin-top: 22px; text-wrap: balance; }
.post__meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 15px; color: var(--ink-2); }
.post__byline { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--muted); }
.post__cover { margin-top: 36px; border: 1px solid var(--line); overflow: hidden; }
.post__cover img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }

.toc { margin-top: 36px; padding: 24px 28px 20px; background: var(--paper); border: 1px solid var(--line); }
.toc__title { font-family: var(--latin); font-style: italic; font-size: 20px; color: var(--gold); margin-bottom: 8px; }
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; display: flex; gap: 12px; }
.toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--latin); color: var(--gold); font-size: 15px; padding-top: 5px; min-width: 22px; }
.toc a { font-size: 16px; line-height: 1.7; padding-block: 4px; color: var(--ink-2); transition: color .3s; }
.toc a:hover { color: var(--gold); }

/* ---------- article typography ---------- */
.prose { margin-top: 44px; font-size: clamp(17.5px, 1.3vw, 19.5px); font-weight: 400; line-height: 1.95; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose p { margin-top: 1.15em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--ink); border-bottom: 1px solid var(--gold); transition: color .3s; }
.prose a:hover { color: var(--gold); }
.prose h2 {
  font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3vw, 37px); line-height: 1.25; color: var(--ink);
  margin-top: 2.1em; padding-top: 1.2em; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose h2::before { content: "◆"; color: var(--gold); font-size: .38em; margin-inline-end: .9em; vertical-align: .55em; }
.prose h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2vw, 24px); line-height: 1.35; color: var(--ink); margin-top: 1.9em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 + p { margin-top: .6em; }
.prose ul, .prose ol { margin-top: 1.1em; display: grid; gap: .55em; padding-inline-start: 0; }
.prose ul > li { position: relative; padding-inline-start: 1.5em; }
.prose ul > li::before { content: ""; position: absolute; inset-inline-start: .15em; top: .85em; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.prose ol { counter-reset: n; }
.prose ol > li { counter-increment: n; position: relative; padding-inline-start: 2.1em; }
.prose ol > li::before { content: counter(n); position: absolute; inset-inline-start: 0; top: 0; font-family: var(--latin); font-size: 1.15em; color: var(--gold); }
.prose li > ul, .prose li > ol { margin-top: .5em; }
.prose blockquote { margin-top: 1.6em; padding: 18px 24px; background: var(--paper); border-inline-start: 2px solid var(--gold); color: var(--ink-2); }
.prose blockquote p { margin: 0; font-size: .94em; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin-block: 2.6em 0; }
.prose img { margin-top: 1.6em; }
.table-wrap { margin-top: 1.6em; overflow-x: auto; border: 1px solid var(--line); background: var(--paper); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .88em; line-height: 1.65; }
.prose th { background: var(--sand); color: var(--ink); font-weight: 600; text-align: start; }
.prose th, .prose td { padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose td + td, .prose th + th { border-inline-start: 1px solid var(--line); }

/* ---------- CTA, sources ---------- */
.post__cta { margin-top: 72px; padding: clamp(32px, 5vw, 56px); background: var(--night); color: var(--ivory); position: relative; overflow: hidden; isolation: isolate; }
.post__cta::before { content: ""; position: absolute; width: 420px; height: 420px; inset-block-start: -160px; inset-inline-start: -120px; background: radial-gradient(circle, rgba(201,174,126,.28), transparent 68%); z-index: -1; }
.post__cta h2 { font-family: var(--serif); font-weight: 200; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.2; margin-top: 18px; }
.post__cta p:not(.eyebrow) { margin-top: 14px; color: rgba(246,243,238,.75); max-width: 520px; font-size: 17px; line-height: 1.8; }
.post__cta-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.post__cta-phone { font-family: var(--latin); font-size: 24px; letter-spacing: .06em; color: var(--gold-2); }
.post__cta-phone:hover { color: var(--ivory); }

.post__sources { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.post__sources h2 { font-family: var(--serif); font-weight: 300; font-size: 22px; color: var(--ink); }
.post__sources ol { margin-top: 16px; padding-inline-start: 1.4em; list-style: decimal; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.post__sources a { color: var(--ink-2); border-bottom: 1px solid var(--line-2); word-break: break-word; }
.post__sources a:hover { color: var(--gold); border-color: var(--gold); }

.post__related { margin-top: clamp(72px, 9vw, 120px); padding-block: clamp(64px, 8vw, 110px); background: var(--paper); border-top: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .pgrid { grid-template-columns: 1fr; }
  .prose table { min-width: 460px; }
  .post__cta-actions .btn { width: 100%; }
  .toc { padding: 20px 20px 14px; }
  .blog-latest .sec-head__aside { justify-self: start; }
}

/* ---------- post hero: the photo is the background of the title area ---------- */
.post__hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(440px, 64vh, 660px); overflow: hidden; background: var(--night); color: var(--ivory); }
.post__hero-bg { position: absolute; inset: 0; z-index: -2; }
.post__hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.post__hero-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(13,13,12,.88) 0%, rgba(13,13,12,.6) 55%, rgba(13,13,12,.34) 100%); }
.post__hero-inner { width: 100%; max-width: calc(780px + var(--gutter) * 2); margin-inline: auto; padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(52px, 6vw, 76px); }
.post__hero { text-shadow: 0 1px 14px rgba(0,0,0,.45); }
.post__hero .eyebrow { color: var(--ivory); font-weight: 500; }
.post__hero .eyebrow .dot { background: var(--gold-2); }
.post__hero .crumbs { color: rgba(246,243,238,.8); margin-bottom: 30px; }
.post__hero .crumbs a:hover { color: var(--gold-2); }
.post__hero .post__title { color: var(--ivory); font-weight: 300; font-size: clamp(30px, 4.3vw, 54px); text-shadow: 0 2px 32px rgba(0,0,0,.35); }
.post__hero .post__meta { color: rgba(246,243,238,.86); }
.post__hero .post__byline { border-top-color: rgba(246,243,238,.25); color: rgba(246,243,238,.78); }
.post__credit { position: absolute; bottom: 12px; inset-inline-start: var(--gutter); margin: 0; font-size: 12px; line-height: 1.5; color: rgba(246,243,238,.62); }
.post__credit a { border-bottom: 1px solid rgba(246,243,238,.35); }
.post__credit a:hover { color: var(--gold-2); border-color: var(--gold-2); }
.post__hero + .post__wrap { padding-top: clamp(36px, 5vw, 60px); }
@media (max-width: 700px) {
  .post__hero { min-height: 420px; }
  .post__credit { inset-inline-start: var(--gutter); inset-inline-end: var(--gutter); }
}
