/* Full project articles are the default; desktop and portrait stages enhance them independently. */
.project-sequence {
  --ps-ground: #f4f0e8;
  --ps-frame: #e9e2d7;
  background: var(--ps-ground);
  color: #28241f;
  height: auto;
  min-height: 0;
  padding-block: clamp(80px, 8.5vw, 128px);
}
.project-sequence__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 40px;
  margin-bottom: 64px;
}
.project-sequence__head .eyebrow { margin: 0; color: #686056; }
.project-sequence__head h2 { margin: 0; font-size: clamp(48px, 4.6vw, 70px); line-height: 1.04; }
.project-sequence__list { display: grid; gap: 96px; list-style: none; margin: 0; padding: 0; }
.project-sequence__item {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.65fr);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
  min-width: 0;
}
.project-sequence__copy { min-width: 0; max-width: 34ch; }
.project-sequence__number {
  display: block;
  color: #686056;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .13em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 28px;
}
.project-sequence__copy h3 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(36px, 3.5vw, 53px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.project-sequence__copy p { margin: 24px 0 28px; font-size: 14px; line-height: 1.85; color: #686056; }
.project-sequence__copy .text-link { min-height: 44px; width: fit-content; font-size: 13px; }
.project-sequence__copy :focus-visible { outline: 2px solid #8c7159; outline-offset: 5px; }
.project-sequence__photo { display: block; margin: 0; min-width: 0; overflow: hidden; background: var(--ps-frame); }
.project-sequence__photo > img { display: block; width: 100%; height: auto; max-height: 82svh; object-fit: contain; }

@media screen and (min-width: 1024px) and (min-height: 720px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .project-sequence.is-enhanced { height: var(--ps-height); padding: 0; scroll-margin-top: calc(-1 * (var(--nav, 104px) + 24px)); }
  .project-sequence.is-enhanced > .project-sequence__wrap {
    position: sticky;
    top: 0;
    height: var(--ps-viewport);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    gap: 34px;
    padding-block: calc(var(--nav, 104px) + 30px) 40px;
    box-sizing: border-box;
  }
  .project-sequence.is-enhanced .project-sequence__head { margin: 0; }
  .project-sequence.is-enhanced .project-sequence__list { min-height: 0; height: 100%; gap: 0; }
  .project-sequence.is-enhanced .project-sequence__item { grid-area: 1 / 1; min-height: 0; height: 100%; align-items: stretch; pointer-events: none; }
  .project-sequence.is-enhanced .project-sequence__copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    opacity: 0;
    pointer-events: none;
    transition: none;
    z-index: 1;
  }
  .project-sequence.is-enhanced .project-sequence__item.is-current .project-sequence__copy { opacity: 1; pointer-events: auto; z-index: 2; }
  .project-sequence.is-enhanced .project-sequence__photo {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: 4 / 3;
    align-self: center;
    min-height: 0;
    position: relative;
    clip-path: inset(0 calc(100% - var(--ps-reveal, 0%)) 0 0);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(var(--ps-reveal, 0%) - 18px), transparent var(--ps-reveal, 0%), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(var(--ps-reveal, 0%) - 18px), transparent var(--ps-reveal, 0%), transparent 100%);
    transition: none;
  }
  .project-sequence.is-enhanced .project-sequence__photo.is-revealed { clip-path: none; -webkit-mask-image: none; mask-image: none; }
  .project-sequence.is-enhanced .project-sequence__photo > img { height: 100%; max-height: none; object-fit: cover; transform: none; transition: none; }
  .project-sequence.is-enhanced .project-sequence__photo > img[data-subject="furniture-bath"] { object-position: 44% 50%; }
}

@media (max-width: 1023px) {
  .project-sequence { padding-block: 80px; }
  .project-sequence__head { display: grid; gap: 20px; margin-bottom: 50px; }
  .project-sequence__head h2 { font-size: clamp(44px, 6.5vw, 63px); }
  .project-sequence__list { gap: 72px; }
  .project-sequence__item { grid-template-columns: minmax(200px, .8fr) minmax(0, 1.2fr); gap: 34px; }
  .project-sequence__copy h3 { font-size: 36px; }
}
@media (max-width: 767px) {
  .project-sequence { padding-block: 72px; }
  .project-sequence__head { gap: 18px; margin-bottom: 42px; }
  .project-sequence__head h2 { font-size: clamp(39px, 10vw, 58px); }
  .project-sequence__list { gap: 64px; }
  .project-sequence__item { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .project-sequence__copy { max-width: 42ch; }
  .project-sequence__number { margin-bottom: 19px; font-size: 10px; }
  .project-sequence__copy h3 { font-size: clamp(35px, 9.3vw, 48px); }
  .project-sequence__copy p { margin-block: 18px 19px; font-size: 14px; }
  .project-sequence__photo > img { max-height: 76svh; }
}

/* A portrait composition reserves real space for every title, paragraph and 44px link.
   JavaScript enables it only after all photographs/fonts are ready and the measured content fits. */
@media screen and (min-width: 320px) and (max-width: 1023px) and (orientation: portrait) and (prefers-reduced-motion: no-preference) {
  .project-sequence.is-mobile-enhanced {
    height: var(--ps-height, 315svh);
    padding: 0;
    scroll-margin-top: calc(-1 * (var(--nav, 94px) + 16px));
  }
  .project-sequence.is-mobile-enhanced > .project-sequence__wrap {
    position: sticky;
    top: 0;
    height: 100svh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    gap: 16px;
    padding-block: calc(var(--nav, 94px) + 16px) max(18px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }
  .project-sequence.is-mobile-enhanced .project-sequence__head { display: grid; gap: 9px; margin: 0; }
  .project-sequence.is-mobile-enhanced .project-sequence__head .eyebrow { font-size: 10px; line-height: 1.4; }
  .project-sequence.is-mobile-enhanced .project-sequence__head h2 { font-size: clamp(31px, 8.2vw, 49px); line-height: 1.05; }
  .project-sequence.is-mobile-enhanced .project-sequence__list { min-height: 0; height: 100%; gap: 0; }
  .project-sequence.is-mobile-enhanced .project-sequence__item {
    grid-area: 1 / 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--ps-photo-height, 200px) var(--ps-copy-height, max-content);
    align-content: start;
    align-items: start;
    gap: 14px;
    height: 100%;
    min-height: 0;
    pointer-events: none;
  }
  .project-sequence.is-mobile-enhanced .project-sequence__photo {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    width: 100%;
    height: var(--ps-photo-height, 200px);
    min-height: 0;
    clip-path: inset(calc(100% - var(--ps-reveal, 0%)) 0 0 0);
    -webkit-mask-image: linear-gradient(to top, #000 0, #000 calc(var(--ps-reveal, 0%) - 12px), transparent var(--ps-reveal, 0%), transparent 100%);
    mask-image: linear-gradient(to top, #000 0, #000 calc(var(--ps-reveal, 0%) - 12px), transparent var(--ps-reveal, 0%), transparent 100%);
    transition: none;
  }
  .project-sequence.is-mobile-enhanced .project-sequence__photo.is-revealed { clip-path: none; -webkit-mask-image: none; mask-image: none; }
  .project-sequence.is-mobile-enhanced .project-sequence__photo > img { width: 100%; height: 100%; max-height: none; object-fit: cover; transform: none; transition: none; }
  .project-sequence.is-mobile-enhanced .project-sequence__photo > img[data-subject="furniture-bath"] { object-position: 44% 50%; }
  .project-sequence.is-mobile-enhanced .project-sequence__copy {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: start;
    width: 100%;
    height: var(--ps-copy-height, auto);
    max-width: none;
    min-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: none;
    z-index: 1;
  }
  .project-sequence.is-mobile-enhanced .project-sequence__item.is-current .project-sequence__copy { opacity: 1; pointer-events: auto; z-index: 2; }
  .project-sequence.is-mobile-enhanced .project-sequence__number { position: absolute; right: 0; bottom: 15px; font-size: 10px; line-height: 1.4; margin: 0; }
  .project-sequence.is-mobile-enhanced .project-sequence__copy h3 { flex: none; font-size: clamp(34px, 9.2vw, 40px); line-height: 1.08; overflow-wrap: break-word; }
  .project-sequence.is-mobile-enhanced .project-sequence__copy p { flex: none; font-size: 13px; line-height: 1.65; margin: 11px 0 12px; }
  .project-sequence.is-mobile-enhanced .project-sequence__copy .text-link { flex: none; min-height: 44px; max-width: calc(100% - 64px); margin-top: auto; font-size: 12px; }
}

@media print {
  .project-sequence { padding-block: 36px; }
  .project-sequence__list { gap: 40px; }
  .project-sequence__item { break-inside: avoid; }
  .project-sequence__photo > img { max-height: 60vh; }
}
