/* Large editorial headings pair with the existing sans-serif report text. */
:root {
  --display: "Instrument Serif", Georgia, serif;
}
:is(.page-heading, .post-header, .section-heading) :is(h1, h2),
.work-copy h3, .writing-title, .profile-section > h2,
.report-content > h2, .comparison > h2, .footer-name {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.section-heading h2 { font-size: clamp(2.7rem, 5vw, 5rem); }
.work-copy h3, .writing-title { font-size: clamp(1.8rem, 3vw, 3rem); }
.page-heading { padding-block: 0 clamp(.35rem, 1svh, .75rem); margin-bottom: clamp(1.35rem, 3.5svh, 2.5rem); }
.report-content > p, .profile-entry li, .about-heading > div > p { text-align: start; }
.main:has(.hero) { padding-top: clamp(.85rem, 2vw, 2rem); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border-radius: .75rem;
  background: #102820;
  color: #fffdf2;
}
.hero-copy {
  z-index: 1;
  width: fit-content;
  padding: clamp(1.85rem, 6svh, 4rem) clamp(1.5rem, 4.5vw, 4rem);
}
.hero-copy .eyebrow { color: #d6e9b9; }
.hero h1 {
  font: 400 clamp(2.7rem, 4.8vw, 5rem)/.97 var(--display);
  letter-spacing: -.042em;
  margin-block: 1.5rem;
}
.hero h1 span { color: #dfefc9; font-style: italic; }
.hero-copy > p:not(.eyebrow) { color: #f0f2e9; max-width: 33ch; line-height: 1.65; }
.hero-actions .text-link { color: #fffdf2; }
.hero-actions .text-link:first-child {
  background: #deedbd;
  color: #18372d;
  border: 0;
  border-radius: 2rem;
  padding: .65rem 1.2rem;
}
.hero-figure {
  position: absolute;
  inset: 0 0 0 25%;
  border: 0;
  border-radius: 0;
  background: #102820;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #102820 0%, #102820e8 16%, #10282055 46%, transparent 71%);
}
.hero-figure-caption {
  position: absolute;
  z-index: 1;
  right: 1rem;
  bottom: 1rem;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  background: #102820ed;
  color: white;
  border-radius: .3rem;
}
.hero-figure-caption .figure-action { color: #deedbd; }
.hero-figure:focus-visible { outline-offset: -5px; outline-color: #deedbd; }
.work-card { border-radius: .55rem; }
.work-copy { border-top: 1px solid var(--border); }
@media (min-width: 72.01rem) {
  #featured-projects .work-media { aspect-ratio: 16 / 9; }
}
.capability-band h2 { font: 400 clamp(1.5rem, 2.3vw, 2.1rem)/1.15 var(--display); }
.footer-name { font-size: 2.3rem; }
@media (min-width: 51rem) {
  .hero-copy { max-width: 58%; }
}
@media (max-width: 50rem) {
  .hero-copy { padding: clamp(1.4rem, 4vw, 2.5rem); }
  .hero-figure { position: relative; inset: auto; }
  .hero-figure img { aspect-ratio: 2 / 1; height: auto; }
  .hero-figure::after { display: none; }
  .hero-figure-caption { bottom: .6rem; right: .6rem; left: .6rem; }
  .hero h1 { font-size: clamp(2.5rem, 8vw, 4rem); }
  .capability-band a { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .work-media img, .hero-figure img {
    transition: transform .65s cubic-bezier(.2,.7,.25,1);
  }
  @media (hover: hover) {
    .work-card:hover .work-media img, .hero-figure:hover img { transform: scale(1.025); }
  }
  .hero-actions a:focus-visible span, .work-card:focus-visible .text-link span {
    transform: translateX(.2rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-figure img { transform: translateY(var(--cover-shift, 0%)) scale(1.16); transition: none; }
  .hero-figure:hover img { transform: translateY(var(--cover-shift, 0%)) scale(1.16); }
}
@media (max-width: 50rem) {
  .hero-figure { overflow: hidden; }
}
.corridor-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.corridor-controls button:disabled { opacity: .5; }
/* Give both featured studies room on wider screens. */
#featured-projects { gap: clamp(1.1rem, 2vw, 2.25rem); }
@media (min-width: 52rem) and (max-width: 72rem) {
  #featured-projects { grid-template-columns: 1fr; }
  #featured-projects .work-card { display: grid; grid-template-columns: 1.3fr 1fr; }
  #featured-projects .work-media { aspect-ratio: auto; min-height: 17rem; }
  #featured-projects .work-copy { justify-content: center; padding: clamp(1.5rem, 3vw, 3rem); border-top: 0; }
  #featured-projects .work-copy .text-link { margin-top: 0; }
  #featured-projects .work-card:nth-child(even) { grid-template-columns: 1fr 1.3fr; }
  #featured-projects .work-card:nth-child(even) .work-media { order: 1; }
}
.corridor-controls button {
  border: 1px solid var(--border); border-radius: 2rem; min-height: 44px;
  padding: .5rem 1rem; background: var(--card); color: var(--text);
}
@media (max-width: 44rem) {
  .ambient-map {
    opacity: .64;
    mask-image: linear-gradient(90deg, black, #0008 9%, #0004 22%, #0003 50%, #0004 78%, #0008 91%, black);
    -webkit-mask-image: linear-gradient(90deg, black, #0008 9%, #0004 22%, #0003 50%, #0004 78%, #0008 91%, black);
  }
}
@media (min-width: 44.01rem) {
  .ambient-map { mask-image: linear-gradient(90deg, black, #0005 12%, #0002 32%, #0001 50%, #0002 68%, #0005 88%, black); }
}

.figure-art { position: relative; min-width: 0; }
.figure-art > img { display: block; width: 100%; height: auto; border-bottom: 0; }
.image-enlarge, .corridor-preview .image-enlarge {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: fit-content; max-width: 100%; min-height: 2.75rem; padding: .35rem .9rem;
  border: 1px solid var(--border); border-radius: 2rem; background: var(--card);
  color: var(--text); font: 500 .82rem/1.2 var(--sans); text-decoration: none;
  cursor: pointer; margin: .45rem 0 0;
}
.image-enlarge:hover { border-color: var(--accent); }
.project-map-stage > .image-enlarge { position: absolute; right: .5rem; bottom: .5rem; }
[data-sequence="plates"], [data-sequence="narrative"] { display: grid; gap: 1.25rem; }
[data-sequence="narrative"] > p { margin: 0; }
[data-sequence="plates"] > figure, [data-sequence="narrative"] > figure { margin: 0; }
@media (min-width: 60rem) {
  [data-sequence="plates"], [data-sequence="narrative"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-sequence="narrative"] > figure { grid-row: 1; }
  [data-sequence="narrative"] > p { grid-row: 2; }
  [data-sequence="narrative"] .figure-art > img, [data-sequence="plates"] .figure-art > img {
    aspect-ratio: 4 / 3; object-fit: contain;
  }
}

.map-essay-spread {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-block: 1.5rem 3rem;
}
.map-essay-entry { min-width: 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.map-essay-entry h3 { margin: 0; font: 400 clamp(1.6rem, 2.3vw, 2.4rem)/1.15 var(--display); }
.map-essay-entry .report-figure { margin: 1rem 0; }
.map-essay-entry p { margin: 0; max-width: 62ch; text-align: start; line-height: 1.7; }
@media (min-width: 68rem) {
  .map-essay-spread { grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
  .map-essay-entry { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: .85rem; align-content: start; }
  .map-essay-entry .report-figure { margin: 0; align-self: start; }
}

.project-map .chinatown-plate { max-inline-size: clamp(43rem, 22rem + 28vw, 56rem); margin: 1.3rem auto 0; }
.chinatown-plate .map-hotspot { width: clamp(1.8rem, 6%, 2.25rem); font-size: .94rem; }
.project-map-stage > img { display: block; }
.project-map .corridor-diagram { margin-top: 1.25rem; }
.project-map .corridor-preview { margin: 1rem 0; }
/* Use a common map width and frame throughout the Hochelaga report. */
.post-uniform-figures .report-content :is([data-sequence="plates"], [data-sequence="narrative"], .map-essay-spread) {
  display: block;
}
.post-uniform-figures .report-content .map-essay-entry { display: block; }
.post-uniform-figures .report-content .report-figure { margin: 1.25rem 0 2rem; }

/* Scale the shared reading measure with the screen and keep the report centred. */
.report-page { --report-width: clamp(46rem, 19rem + 49vw, 83rem); }
.post {
  --figure-width: clamp(44rem, 8rem + 46vw, 60rem);
  inline-size: min(100%, var(--report-width));
  margin-inline: auto;
}
.post-header h1 {
  max-inline-size: none;
  font-size: clamp(2.4rem, 4.4vw, 4.4rem);
  line-height: 1.02;
}
.post-header > p:not(.eyebrow) { font-size: clamp(1.05rem, .95rem + .3vw, 1.2rem); }
.post-overview { gap: 1.25rem 2rem; padding-block: 1.15rem; margin-bottom: 1.6rem; }
.post-hero {
  inline-size: fit-content;
  max-inline-size: min(100%, var(--figure-width));
  margin: 0 auto 1.5rem;
}
.post .hero-img {
  width: auto;
  max-height: min(28rem, 66svh);
  margin-inline: auto;
  border: 0;
  border-radius: .5rem;
}

.report-layout { display: block; }
.report-contents {
  position: static;
  max-height: none;
  overflow: visible;
  padding: 0;
  margin: 0 0 clamp(1.65rem, 4svh, 2.65rem);
  border: 0;
  border-block: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.report-contents summary { padding: 0; }
.report-contents[open] summary { border: 0; margin-bottom: .25rem; }
.report-contents .reading-time {
  margin: 0 0 0 auto;
  font: 400 .81rem/1.3 var(--sans);
  letter-spacing: normal;
  text-transform: none;
}
.report-contents ol { display: flex; flex-wrap: wrap; gap: .1rem .35rem; border: 0; }
.report-contents a {
  border: 0;
  border-radius: .35rem;
  margin: 0;
  padding: .35rem .65rem;
  font-size: .88rem;
}
.report-contents .copy-section { margin-inline: .65rem; min-height: 2.5rem; padding: 0; }
.report-contents .copy-status { display: inline; min-height: 0; }
.report-content {
  font-size: clamp(1.0625rem, .8rem + .52vw, 1.45rem);
  line-height: 1.68;
}
.report-content > :is(p, ul, ol, blockquote) { max-inline-size: none; }
.report-content > p { text-wrap: pretty; hyphens: manual; margin-bottom: 1rem; }
.report-content > h2 {
  margin-block: clamp(2.35rem, 5svh, 3.5rem) .8rem;
  padding-top: .75rem;
  font-size: clamp(1.95rem, 2.7vw, 2.6rem);
}
.report-content > h2:first-child { padding-top: 0; border-top: 0; }
.post .related-projects { margin-top: 2.75rem; }

/* Keep the original image proportions and place enlargement beside the caption. */
.post .report-content .report-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .2rem 1rem;
  max-inline-size: var(--figure-width);
  margin: 1.1rem auto 1.9rem;
}
.report-figure .figure-art { display: contents; }
.post .report-figure .figure-art > img {
  grid-column: 1 / -1;
  justify-self: center;
  width: auto;
  max-width: 100%;
  max-height: min(34rem, 75svh);
  border: 0;
  border-radius: .4rem;
}
.report-figure figcaption { grid-column: 1; grid-row: 2; margin-top: .45rem; }
.report-figure .figure-art > .image-enlarge {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 0;
  padding-inline: .35rem;
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}
.report-figure .figure-art > .image-enlarge:hover { text-decoration: underline; }

@media (min-width: 55rem) {
  .report-page .ambient-map {
    --report-edge: max(13%, calc((100% - var(--report-width)) / 2));
    --report-mask: linear-gradient(90deg, #000, #0007 8%, #0001 var(--report-edge), transparent 44%,
      transparent 56%, #0001 calc(100% - var(--report-edge)), #0007 92%, #000);
    -webkit-mask-image: var(--report-mask);
    mask-image: var(--report-mask);
  }
}
@media (max-width: 32rem) {
  .post-header h1 { font-size: clamp(2.1rem, 8.8vw, 3rem); }
  .report-contents ol { flex-direction: column; }
}
@media print {
  .post { inline-size: 100%; }
  .report-content { font-size: 10pt; }
  .report-figure .figure-art > .image-enlarge { display: none; }
}
