/* Round 45: single post "Opening Shot" (Mo chose option A, 18 Nov 2026; prototype
   New website/blog-post-options/option-a-opening-shot.html). The featured image is the first
   frame: full screen, pulled into focus on load, held still while the article sheet slides up
   over it. Title and standfirst sit bottom left, the meta in a column bottom right.
   Single posts only; loaded after residue so the doubled residue selectors are outranked. */

body.single-post .page-hero.page-hero--has-image-tuck-bottom {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: max(600px, 100svh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px 0 clamp(5.5rem, 11vh, 8.5rem);
  background: #07191E;
  isolation: isolate;
}
body.single-post .page-hero--has-image-tuck-bottom .hero-bg.hero-bg {
  position: absolute;
  inset: 0;
  height: auto;
  opacity: 1;
  z-index: -1;
  overflow: hidden;
  will-change: transform;
  transform: translate3d(0, calc(var(--cad-shot, 0) * 6%), 0) scale(calc(1 + var(--cad-shot, 0) * .06));
}
body.single-post .page-hero--has-image-tuck-bottom .hero-bg__img.hero-bg__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 55%;
  opacity: 1;
  filter: none;
  animation: cad-focus-pull 1.9s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes cad-focus-pull {
  from { transform: scale(1.14); filter: blur(16px) brightness(.55); }
  to { transform: scale(1); filter: blur(0) brightness(1); }
}
/* Legibility wash: dark at the foot for the title, a little at the top for the nav,
   clear in the middle so the picture reads. The ::before deepens as the sheet covers it. */
body.single-post .page-hero--has-image-tuck-bottom .hero-bg.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 25, 30, .62) 0%, rgba(7, 25, 30, 0) 24%),
    linear-gradient(0deg, rgba(7, 25, 30, .94) 0%, rgba(7, 25, 30, .66) 32%, rgba(7, 25, 30, 0) 64%);
}
body.single-post .page-hero--has-image-tuck-bottom .hero-bg.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #07191E;
  opacity: calc(var(--cad-shot, 0) * .55);
}

/* Hero copy: title block left, meta column right */
body.single-post .page-hero--has-image-tuck-bottom > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  grid-template-areas: "crumb crumb" "title meta" "sub meta";
  column-gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  width: 100%;
}
body.single-post .page-hero--has-image-tuck-bottom .crumb {
  grid-area: crumb;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1.4rem;
  font: 400 .9rem/1.4 "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(234, 243, 235, .78);
  text-decoration: none;
}
body.single-post .page-hero--has-image-tuck-bottom .crumb .eyebrow-raw {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}
body.single-post .page-hero--has-image-tuck-bottom .crumb::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m11 19-7-7 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m11 19-7-7 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
body.single-post .page-hero--has-image-tuck-bottom .crumb:hover { color: #fff; }
body.single-post .page-hero--has-image-tuck-bottom .crumb:hover::before { transform: translateX(-4px); }

body.single-post .page-hero--has-image-tuck-bottom .container__h1 {
  grid-area: title;
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.6rem, 5.6vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.035em;
  color: #fff;
  text-wrap: balance;
  animation: cad-rise 1.1s cubic-bezier(.22, 1, .36, 1) .1s both;
}
body.single-post .page-hero--has-image-tuck-bottom.cad-long-title .container__h1 {
  max-width: 22ch;
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  line-height: 1;
}
body.single-post .page-hero--has-image-tuck-bottom .hero-sub {
  grid-area: sub;
  max-width: 56ch;
  margin: 1.4rem 0 0;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: rgba(234, 243, 235, .86);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  animation: cad-rise 1s cubic-bezier(.22, 1, .36, 1) .3s both;
}
body.single-post .page-hero--has-image-tuck-bottom .art-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
  padding-top: 1.1rem;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, .2);
  font: 400 .76rem/1.5 "JetBrains Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(234, 243, 235, .74);
  animation: cad-rise 1s cubic-bezier(.22, 1, .36, 1) .45s both;
}
body.single-post .page-hero--has-image-tuck-bottom .art-meta .byline {
  flex-basis: 100%;
  font: 500 .95rem/1.4 "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(234, 243, 235, .8);
}
body.single-post .page-hero--has-image-tuck-bottom .art-meta .byline-a { color: #fff; text-decoration: none; }
body.single-post .page-hero--has-image-tuck-bottom .art-meta .byline-a:hover { text-decoration: underline; text-underline-offset: .2em; }
body.single-post .page-hero--has-image-tuck-bottom .art-meta .byline + [class*="sep"] { display: none; }
@keyframes cad-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* The article sheet already sits above the hero (z 4) with a rounded top; give it a soft lift */
body.single-post .art-body.art-body { box-shadow: 0 -24px 48px -28px rgba(7, 25, 30, .55); }
/* Plain off white reading sheet (Mo, 19 Nov 2026): no mint, no shader blobs behind the text */
body.single-post .art-body.art-body.light { background: #FAFAF7; }
body.single-post .art-body.light > .grad-hold { display: none; }

/* Sidebar on the hero's left edge, reading column centred on the page (Mo, 19 Nov 2026).
   Equal flexible side tracks keep the middle column centred; the left one never drops below the contents width. */
@media (min-width: 1000px) {
  body.single-post .art-body .art-layout.art-layout {
    grid-template-columns: minmax(208px, 1fr) minmax(0, 720px) minmax(0, 1fr);
    justify-content: stretch;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
  body.single-post .art-layout > .art-toc { grid-column: 1; justify-self: start; width: 208px; }
  body.single-post .art-layout > .prose.brxe-div { grid-column: 2; width: 100%; max-width: none; margin-inline: 0; }
}

/* Contents: mark the section being read (r45-post-hero.js sets .is-on) */
body.single-post .art-toc__a.is-on { color: #0B262D; font-weight: 500; }

/* Reading progress, top of the screen */
.cad-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1000;
  background: #1DBED5;
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

@media (max-width: 800px) {
  body.single-post .page-hero--has-image-tuck-bottom > .container {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "crumb" "title" "sub" "meta";
  }
  body.single-post .page-hero--has-image-tuck-bottom .art-meta { margin-top: 1.75rem; }
  /* One column on phones: let the track shrink to the screen so nothing inside can push it wider */
  body.single-post .art-body .art-layout.art-layout { grid-template-columns: minmax(0, 1fr); }
  body.single-post .art-layout > .prose.brxe-div { width: 100%; }
}
/* Long bare links and pasted URLs in older posts must wrap rather than push the column wider */
body.single-post .prose a, body.single-post .prose p, body.single-post .prose li { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  body.single-post .page-hero.page-hero--has-image-tuck-bottom { padding-bottom: 4.25rem; }
  body.single-post .page-hero--has-image-tuck-bottom .container__h1 { font-size: clamp(2.4rem, 11vw, 3.3rem); max-width: none; }
  body.single-post .page-hero--has-image-tuck-bottom.cad-long-title .container__h1 { font-size: clamp(1.95rem, 8.4vw, 2.6rem); }
  body.single-post .page-hero--has-image-tuck-bottom .hero-sub { -webkit-line-clamp: 4; }
}
@media (prefers-reduced-motion: reduce) {
  body.single-post .page-hero--has-image-tuck-bottom .hero-bg.hero-bg { transform: none; }
  body.single-post .page-hero--has-image-tuck-bottom .hero-bg__img.hero-bg__img,
  body.single-post .page-hero--has-image-tuck-bottom .container__h1,
  body.single-post .page-hero--has-image-tuck-bottom .hero-sub,
  body.single-post .page-hero--has-image-tuck-bottom .art-meta { animation: none; }
}
