/* A photograph opens in place, not in a separate fullscreen viewer. */
.page-photo-archetypes .photo-heading {
  transition: opacity 650ms ease, transform 650ms ease, visibility 0s;
}
.page-photo-archetypes.is-photo-focused .photo-heading {
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  pointer-events: none; transition: opacity 650ms ease, transform 650ms ease, visibility 0s 650ms;
}
@media (prefers-reduced-motion: reduce) {
  .page-photo-archetypes .photo-heading,
  .page-photo-archetypes.is-photo-focused .photo-heading { transition: none; }
}
.page-photo-archetypes .photo-grid { position: relative; }
.page-photo-archetypes .photo-item { grid-row: 1; }
.page-photo-archetypes .photo-item:nth-of-type(1) { grid-column: 1; }
.page-photo-archetypes .photo-item:nth-of-type(2) { grid-column: 2; }
/* Bring the artwork and tale closer to the page heading. */
.page-photo-archetypes .photo-main { padding-top: 66px; }
.page-photo-archetypes .photo-heading { padding-top: 18px; padding-bottom: 0; }
.page-photo-archetypes:not(.is-photo-focused) .photo-heading { padding-bottom: 28px; }

/* The tale wraps beside the artwork, then continues across the page. */
.page-photo-archetypes.is-photo-focused .photo-grid {
  display: flow-root; max-width: 1200px;
}
.page-photo-archetypes.is-photo-focused .photo-item.is-active {
  float: left; width: 44%; margin: 0 32px 18px 0;
  transform: translateX(-28px);
}
.is-photo-focused .photo-item.is-dimmed { display: none; }
.is-photo-focused .photo-story {
  position: static; min-width: 0; padding-top: 0;
}
.is-photo-focused .photo-story-close {
  position: absolute; top: 0; right: var(--pad-x); margin: 0;
}
.is-photo-focused .photo-story-title {
  margin-left: calc(44% + 32px); padding-right: 0; text-align: center;
}
.page-photo-archetypes .photo-item {
  position: relative;
  transition: transform 850ms cubic-bezier(.22,.72,.2,1), filter 850ms ease, opacity 850ms ease;
}
.page-photo-archetypes .photo-item.is-active { z-index: 3; transform: translateX(var(--story-shift, -24px)); }
.page-photo-archetypes .photo-open::after { opacity: 1; transition: opacity 800ms ease; }
.page-photo-archetypes .photo-item.is-active .photo-open::after { opacity: 0; }
.page-photo-archetypes .photo-open { transition: filter 800ms ease; }
.page-photo-archetypes .photo-item.is-active .photo-open { filter: none; }
.page-photo-archetypes .photo-open img { transform-origin: top left; transition: transform 850ms cubic-bezier(.22,.72,.2,1); }
.page-photo-archetypes .photo-item.is-active .photo-open img { transform: scale(1.22); }
.page-photo-archetypes .photo-item.is-active .photo-open { margin-bottom: clamp(32px, 4vw, 52px); }
@media (prefers-reduced-motion: reduce) {
  .page-photo-archetypes .photo-open,
  .page-photo-archetypes .photo-open::after,
  .page-photo-archetypes .photo-open img { transition: none; }
}
.page-photo-archetypes .photo-item.is-dimmed { opacity: .14; filter: brightness(.25) saturate(.4); }
.photo-story {
  position: absolute; z-index: 4; left: 54%; right: var(--pad-x); top: 15%;
  opacity: 0; visibility: hidden; transform: translateY(15px);
  transition: opacity 650ms ease, transform 850ms cubic-bezier(.22,.72,.2,1), visibility 0s 650ms;
}
.is-photo-focused .photo-story { opacity: 1; visibility: visible; transform: none; transition-delay: 180ms, 0s, 0s; }
.photo-story-title {
  margin: 0; padding: 6px 0 12px; outline: none;
  font-family: 'Great Vibes', 'Caveat', cursive; font-weight: 400;
  font-size: clamp(42px, 5vw, 72px); line-height: 1.25; letter-spacing: 0;
  color: #ffe8f3; text-shadow: 0 0 18px #db71b127;
}
.photo-story-ink {
  display: inline-block; max-width: 100%; padding: 0 .12em;
  --ink-reveal: 0%;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(var(--ink-reveal) - 2%), transparent var(--ink-reveal));
  mask-image: linear-gradient(to right, #000 0%, #000 calc(var(--ink-reveal) - 2%), transparent var(--ink-reveal));
}
.photo-story-description {
  max-width: none; margin: 8px 0 0; padding-top: 0;
  color: #e5d6df;
  font-family: 'Cormorant', Georgia, serif; font-weight: 400;
  font-size: clamp(21px, 2.1vw, 25px); line-height: 1.45;
  overflow-wrap: break-word;
}
.photo-story-description p { margin: 0 0 .65em; }
.photo-story-description p:first-child::first-letter {
  float: left; margin: .05em .1em 0 0;
  font-family: 'Great Vibes', 'Caveat', cursive;
  font-size: 3.1em; line-height: .85; color: #ffe8f3;
}
.photo-story-description p:last-child { margin-bottom: 0; }
.photo-story-description .photo-story-ending {
  clear: both; margin-top: 1.2em; text-align: right;
  font-style: italic; color: #ffe8f3;
}
.photo-story-description::after {
  content: '✧'; display: block; margin-top: 24px;
  color: #e8bad3; text-align: center; font-size: 24px;
}
.photo-story-close { display: block; margin: 0 0 14px auto; padding: 6px 12px; color: #cbb6c5; font-size: 30px; line-height: 1; }
.photo-story-close:hover { color: #fff; }
.photo-story-close:focus-visible { outline: 1px solid #f1c8de; outline-offset: 4px; }
.photo-writing-quill {
  position: fixed; left: 0; top: 0; width: 96px; height: 96px; z-index: 120;
  visibility: hidden; opacity: 0; pointer-events: none; will-change: transform;
}
.photo-writing-quill.is-visible { visibility: visible; opacity: 1; }
/* The clicked cursor becomes the writing quill. Never show two feathers. */
@media (hover: hover) and (pointer: fine) {
  body.page-photo-archetypes.is-photo-writing,
  body.page-photo-archetypes.is-photo-writing *,
  body.page-photo-archetypes.is-photo-writing .photo-open { cursor: none; }
}
@media (max-width: 650px) {
  .is-photo-focused .photo-item.is-dimmed { display: none; }
  .page-photo-archetypes.is-photo-focused .photo-item.is-active {
    float: none; width: 100%; margin: 0 0 16px; transform: translateX(-12px);
  }
  .photo-story { position: relative; left: auto; right: auto; top: auto; grid-column: 1; display: none; padding: 0 12px; }
  .is-photo-focused .photo-story {
    position: relative; display: block; grid-column: 1; grid-row: 2; padding-top: 0;
  }
  .is-photo-focused .photo-story-close { right: 0; }
  .page-photo-archetypes .photo-item:nth-of-type(2) { grid-column: 1; }
  .photo-story-description { max-width: none; font-size: 22px; }
  .photo-story-title { font-size: clamp(40px, 11vw, 58px); }
  .is-photo-focused .photo-story-title { margin-left: 0; padding-right: 0; }
  .photo-story-close { margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .page-photo-archetypes .photo-item, .photo-story { transition: none; }
  .photo-writing-quill { display: none; }
}
