/* How We Work — page-scoped visual process story ------------------------ */
.how-we-work-page {
  overflow-x: hidden;
  color: var(--navy);
  background: var(--off-white);
}

.how-we-work-page .site-header {
  background: rgb(248 246 240 / 96%);
  backdrop-filter: blur(12px);
}

.work-page {
  overflow: clip;
}

.work-page *,
.work-page *::before,
.work-page *::after {
  box-sizing: border-box;
}

.work-page figure,
.work-page ol {
  margin: 0;
}

.work-page ol {
  padding: 0;
  list-style: none;
}

.work-page img {
  max-width: 100%;
}

.work-page h1,
.work-page h2,
.work-page h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.work-shell {
  width: min(calc(100% - 64px), var(--content-width));
  margin-inline: auto;
}

.work-label {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

/* Fixed-sketch process hero -------------------------------------------- */
.work-hero {
  background: #eee7da;
}

.process-hero__canvas {
  position: relative;
  min-height: 560px;
  height: clamp(560px, 68svh, 680px);
  overflow: hidden;
  border-bottom: 2px solid var(--red);
  isolation: isolate;
}

.process-hero__base,
.process-hero__wash,
.process-overlay,
.process-hero__scan {
  position: absolute;
  inset: 0;
}

.process-hero__base {
  z-index: -4;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 51%;
}

.process-hero__wash {
  z-index: -3;
  background:
    linear-gradient(100deg, rgb(244 239 228 / 97%) 0%, rgb(244 239 228 / 83%) 26%, rgb(244 239 228 / 20%) 53%, transparent 74%),
    linear-gradient(to top, rgb(244 239 228 / 72%), transparent 28%);
}

.process-hero__headline {
  position: absolute;
  z-index: 7;
  top: clamp(48px, 6vw, 72px);
  left: max(32px, calc((100vw - var(--content-width)) / 2));
  max-width: min(650px, 51vw);
}

.process-hero__headline h1 {
  margin: 18px 0 0;
  color: var(--navy);
  font-size: clamp(46px, 4.25vw, 58px);
  font-weight: 800;
  letter-spacing: -0.058em;
  line-height: 0.98;
  text-transform: uppercase;
}

.process-hero__support {
  position: absolute;
  z-index: 7;
  bottom: clamp(32px, 4.5vh, 46px);
  left: max(32px, calc((100vw - var(--content-width)) / 2));
  width: min(330px, 28vw);
  margin: 0;
  color: #526170;
  font-size: 15px;
  line-height: 1.62;
}

.process-hero__scan {
  z-index: 5;
  left: -11%;
  width: 11%;
  right: auto;
  border-right: 1px solid rgb(203 32 48 / 82%);
  background: linear-gradient(to right, transparent, rgb(255 255 255 / 12%) 70%, rgb(203 32 48 / 7%));
  pointer-events: none;
}

.process-hero__canvas.is-scanning .process-hero__scan {
  animation: process-scan 14s linear var(--scan-delay, 0s) infinite;
}

.process-overlay {
  z-index: 2;
  opacity: 0;
  transition: opacity 420ms ease;
  pointer-events: none;
}

.process-overlay.is-active {
  opacity: 1;
}

.process-overlay svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.process-overlay svg path {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.15;
  stroke-dasharray: 6 6;
  vector-effect: non-scaling-stroke;
}

.tech-cross,
.detail-box,
.work-zone,
.verified-point {
  position: absolute;
}

.tech-cross {
  width: 26px;
  height: 26px;
  border: 1px solid var(--red);
  background: rgb(244 239 228 / 58%);
}

.tech-cross::before,
.tech-cross::after {
  position: absolute;
  background: var(--red);
  content: "";
}

.tech-cross::before {
  top: 50%;
  right: -12px;
  left: -12px;
  height: 1px;
}

.tech-cross::after {
  top: -12px;
  bottom: -12px;
  left: 50%;
  width: 1px;
}

.tech-cross--a { top: 49%; left: 31%; }
.tech-cross--b { top: 26%; left: 51%; }
.tech-cross--c { top: 58%; left: 69%; }
.tech-cross--d { top: 32%; left: 87%; }

.detail-box {
  width: clamp(76px, 8vw, 124px);
  aspect-ratio: 1;
  border: 1px solid var(--red);
  background: rgb(244 239 228 / 30%);
}

.detail-box::after {
  position: absolute;
  top: 50%;
  width: clamp(58px, 7vw, 100px);
  height: 1px;
  background: var(--red);
  content: "";
}

.detail-box i {
  position: absolute;
  inset: 12%;
  border: 1px dashed rgb(203 32 48 / 72%);
}

.detail-box--roof { top: 18%; left: 50%; }
.detail-box--roof::after { right: 100%; transform: rotate(26deg); transform-origin: right; }
.detail-box--entry { top: 54%; left: 69%; }
.detail-box--entry::after { left: 100%; transform: rotate(-22deg); transform-origin: left; }

.work-zone {
  border: 1px solid var(--red);
  background: repeating-linear-gradient(135deg, rgb(203 32 48 / 13%) 0 5px, transparent 5px 10px);
}

.work-zone--garage { top: 57%; left: 33%; width: 18%; height: 22%; }
.work-zone--facade { top: 36%; left: 61%; width: 14%; height: 34%; }
.work-zone--chimney { top: 26%; left: 84%; width: 7%; height: 30%; }

.process-overlay--work svg path {
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}

.verified-point {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 50%;
  background: rgb(244 239 228 / 90%);
  font-size: 16px;
  font-weight: 800;
}

.verified-point--a { top: 51%; left: 36%; }
.verified-point--b { top: 30%; left: 54%; }
.verified-point--c { top: 58%; left: 68%; }
.verified-point--d { top: 38%; left: 82%; }

.process-overlay--next svg path {
  stroke-dasharray: none;
}

.process-status {
  position: absolute;
  z-index: 8;
  right: max(32px, calc((100vw - var(--content-width)) / 2));
  bottom: clamp(30px, 4.4vh, 44px);
  width: min(370px, 30vw);
  padding: 25px 26px 24px;
  color: var(--white);
  border-left: 1px solid rgb(255 255 255 / 16%);
  background: rgb(15 45 82 / 97%);
}

.process-status::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 2px;
  background: var(--red);
  content: "";
}

.process-status > h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(21px, 1.8vw, 26px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-transform: uppercase;
}

.process-status > p {
  margin: 10px 0 0;
  color: #c4cfda;
  font-size: 14px;
  line-height: 1.55;
}

@keyframes process-scan {
  from { left: -11%; }
  to { left: 100%; }
}

/* Useful details ------------------------------------------------------- */
.work-share {
  padding-block: clamp(78px, 8vw, 112px);
  color: var(--white);
  background: var(--navy);
}

.work-share__layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.88fr) minmax(500px, 1.12fr);
  align-items: start;
  gap: clamp(60px, 8vw, 112px);
}

.work-share__heading {
  position: sticky;
  top: 118px;
  padding-left: 24px;
  border-left: 3px solid var(--red);
}

.site-stories h2 {
  margin: 22px 0 0;
  color: var(--navy);
  font-size: clamp(48px, 5.2vw, 76px);
  font-weight: 800;
  letter-spacing: -0.062em;
  line-height: 0.94;
  text-transform: uppercase;
}

.work-share h2 {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--white);
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.048em;
  line-height: 1.02;
  text-transform: none;
}

.work-share__heading > p:last-child {
  max-width: 500px;
  margin: 22px 0 0;
  color: #c7d1dc;
  font-size: 15px;
  line-height: 1.68;
}

.share-list {
  border-top: 1px solid rgb(255 255 255 / 22%);
}

.share-list li {
  position: relative;
  padding: clamp(24px, 2.6vw, 34px) 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  border-bottom: 1px solid rgb(255 255 255 / 22%);
  transition: border-color 220ms ease;
}

.share-list li::before {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  width: 3px;
  background: var(--red);
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.share-list li:hover {
  border-bottom-color: rgb(203 32 48 / 70%);
}

.share-list li:hover::before {
  opacity: 1;
}

.share-list > li > span {
  padding-top: 4px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.share-list h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(19px, 1.55vw, 23px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.share-list p {
  max-width: 620px;
  margin: 10px 0 0;
  color: #bdc8d4;
  font-size: 14px;
  line-height: 1.62;
}

/* Architectural project print spread ---------------------------------- */
.site-stories {
  padding-block: clamp(68px, 6vw, 82px);
  background: var(--paper, #f4efe4);
}

.site-stories__heading {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.58fr);
  align-items: end;
  gap: clamp(60px, 10vw, 150px);
}

.site-stories__heading > p {
  max-width: 440px;
  margin: 0 0 4px;
  color: #586675;
  font-size: 17px;
  line-height: 1.72;
}

.project-spread {
  width: 100%;
  min-height: 560px;
  margin-top: clamp(48px, 6vw, 82px);
  padding: 44px 26px 82px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.project-print {
  --rise: 0px;
  --rotation: 0deg;
  --from-x: 0px;
  --entry-delay: 0ms;
  position: relative;
  width: clamp(176px, 16.5vw, 248px);
  flex: 0 0 auto;
  margin-left: clamp(-28px, -1.6vw, -18px);
  padding: 10px 10px 34px;
  border: 1px solid rgb(15 45 82 / 19%);
  background: #f8f1e4;
  opacity: 0.9;
  transform: translateX(var(--from-x)) translateY(calc(var(--rise) + 18px)) rotate(0deg) scale(0.97);
  transition:
    transform 880ms cubic-bezier(0.16, 1, 0.3, 1) var(--entry-delay),
    opacity 700ms ease-out var(--entry-delay),
    border-color 220ms ease;
}

.project-print:first-child {
  margin-left: 0;
}

.project-print::before {
  position: absolute;
  z-index: 3;
  top: -1px;
  left: -1px;
  width: 27px;
  height: 27px;
  border-top: 2px solid var(--red);
  border-left: 2px solid var(--red);
  content: "";
}

.project-print::after {
  position: absolute;
  z-index: 3;
  top: -7px;
  left: 50%;
  width: 42px;
  height: 13px;
  background: var(--red);
  content: "";
  opacity: 0.13;
  transform: translateX(-50%) rotate(-2deg);
}

.project-print__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgb(15 45 82 / 13%);
  background: #ddd5c8;
}

.project-print__photo::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  border-right: 1px solid var(--red);
  border-bottom: 1px solid var(--red);
  content: "";
}

.project-print img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-print figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.project-print:nth-child(1) { --rise: 42px; --rotation: -4deg; --from-x: 250px; --entry-delay: 0ms; z-index: 1; }
.project-print:nth-child(2) { --rise: 25px; --rotation: -2.7deg; --from-x: 170px; --entry-delay: 55ms; z-index: 2; }
.project-print:nth-child(3) { --rise: 10px; --rotation: -1.2deg; --from-x: 85px; --entry-delay: 110ms; z-index: 3; }
.project-print:nth-child(4) { --rise: 0px; --rotation: 0deg; --from-x: 0px; --entry-delay: 165ms; z-index: 7; }
.project-print:nth-child(5) { --rise: 10px; --rotation: 1.2deg; --from-x: -85px; --entry-delay: 220ms; z-index: 5; }
.project-print:nth-child(6) { --rise: 25px; --rotation: 2.7deg; --from-x: -170px; --entry-delay: 275ms; z-index: 4; }
.project-print:nth-child(7) { --rise: 42px; --rotation: 4deg; --from-x: -250px; --entry-delay: 330ms; z-index: 3; }

.project-spread.is-visible .project-print {
  opacity: 1;
  transform: translateX(0) translateY(var(--rise)) rotate(var(--rotation)) scale(1);
}

.project-spread.is-visible .project-print--feature {
  transform: translateX(0) translateY(var(--rise)) rotate(var(--rotation)) scale(1.015);
}

@media (hover: hover) and (pointer: fine) {
  .project-spread.is-visible .project-print:hover {
    z-index: 20;
    border-color: rgb(203 32 48 / 46%);
    transform: translateX(0) translateY(calc(var(--rise) - 12px)) rotate(0deg) scale(1.02);
    transition-delay: 0ms;
  }
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1120px) {
  .process-hero__headline h1 {
    font-size: clamp(44px, 4.9vw, 54px);
  }

  .process-status {
    width: min(340px, 34vw);
  }

  .work-share__layout {
    grid-template-columns: minmax(310px, 0.84fr) minmax(440px, 1.16fr);
    gap: 54px;
  }

  .project-print {
    width: clamp(178px, 21vw, 236px);
    margin-left: -24px;
  }
}

@media (max-width: 900px) {
  .work-shell {
    width: min(calc(100% - 48px), var(--content-width));
  }

  .process-hero__headline {
    left: 24px;
    max-width: 54vw;
  }

  .process-hero__headline h1 {
    font-size: clamp(41px, 5.4vw, 49px);
  }

  .process-hero__support {
    left: 24px;
    width: 280px;
  }

  .process-status {
    right: 24px;
    width: min(340px, 40vw);
  }

  .work-share__layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .work-share__heading {
    position: static;
  }

  .work-share__heading > p:last-child {
    max-width: 660px;
  }

  .share-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid rgb(255 255 255 / 22%);
  }

  .share-list li {
    padding-inline: 22px;
    border-right: 1px solid rgb(255 255 255 / 22%);
  }

  .site-stories__heading {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.68fr);
    gap: 42px;
  }

  .project-spread {
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-inline: 40px;
    scrollbar-width: none;
  }

  .project-spread::-webkit-scrollbar {
    display: none;
  }

  .project-print {
    width: min(30vw, 244px);
    min-width: 210px;
    margin-left: -20px;
  }

  .project-print:nth-child(1) { --rise: 26px; --rotation: -2deg; }
  .project-print:nth-child(2) { --rise: 15px; --rotation: -1.3deg; }
  .project-print:nth-child(3) { --rise: 6px; --rotation: -0.6deg; }
  .project-print:nth-child(5) { --rise: 6px; --rotation: 0.6deg; }
  .project-print:nth-child(6) { --rise: 15px; --rotation: 1.3deg; }
  .project-print:nth-child(7) { --rise: 26px; --rotation: 2deg; }
}

@media (max-width: 768px) {
  .process-hero__canvas {
    min-height: 610px;
    height: 76svh;
    max-height: 690px;
  }

  .process-hero__base {
    object-position: 57% center;
  }

  .process-hero__wash {
    background:
      linear-gradient(to bottom, rgb(244 239 228 / 97%) 0%, rgb(244 239 228 / 86%) 25%, rgb(244 239 228 / 18%) 51%, transparent 66%),
      linear-gradient(to top, rgb(244 239 228 / 58%), transparent 30%);
  }

  .process-hero__headline {
    top: 40px;
    right: 24px;
    left: 24px;
    max-width: 620px;
  }

  .process-hero__headline h1 {
    margin-top: 15px;
    font-size: clamp(35px, 8.5vw, 43px);
    line-height: 0.98;
  }

  .process-hero__support {
    top: 190px;
    bottom: auto;
    left: 24px;
    width: min(320px, calc(100% - 48px));
    font-size: 14px;
  }

  .process-status {
    right: 24px;
    bottom: 24px;
    left: 24px;
    width: auto;
    padding: 22px 22px 21px;
  }

  .process-status > h2 {
    font-size: 22px;
  }

  .tech-cross--a { left: 18%; }
  .detail-box--roof { left: 38%; }
  .work-zone--garage { left: 22%; width: 28%; }

  .work-share {
    padding-block: 64px;
  }

  .site-stories {
    padding-block: 52px;
  }

  .work-shell {
    width: calc(100% - 48px);
  }

  .site-stories h2 {
    font-size: clamp(41px, 10.7vw, 55px);
    line-height: 0.95;
  }

  .work-share h2 {
    font-size: clamp(34px, 8vw, 42px);
    line-height: 1.02;
  }

  .site-stories__heading > p {
    margin-top: 24px;
    font-size: 16px;
  }

  .work-share__heading {
    padding-left: 18px;
  }

  .work-share__heading > p:last-child {
    margin-top: 20px;
    font-size: 15px;
  }

  .share-list {
    display: block;
    border-left: 0;
  }

  .share-list li {
    padding: 23px 0 25px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 13px;
    border-right: 0;
  }

  .share-list li:hover {
    padding-left: 0;
  }

  .share-list h3 {
    font-size: 21px;
  }

  .site-stories__heading {
    display: block;
  }

  .project-spread {
    min-height: 0;
    margin-top: 38px;
    padding: 24px 24px 50px;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 24px;
    scroll-snap-type: x mandatory;
  }

  .project-print,
  .project-print:first-child {
    --rise: 0px;
    --rotation: 0deg;
    --from-x: 28px;
    width: calc(100vw - 84px);
    min-width: 0;
    max-width: 390px;
    flex: 0 0 auto;
    margin-left: 0;
    scroll-snap-align: center;
  }

  .project-spread.is-visible .project-print,
  .project-spread.is-visible .project-print--feature {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }
}

@media (max-width: 520px) {
  .work-shell {
    width: calc(100% - 40px);
  }

  .process-hero__canvas {
    min-height: 580px;
    height: 72svh;
    max-height: 650px;
  }

  .process-hero__headline {
    top: 34px;
    right: 20px;
    left: 20px;
  }

  .process-hero__headline h1 {
    font-size: clamp(32px, 8.8vw, 38px);
  }

  .process-hero__support {
    top: 170px;
    left: 20px;
    width: calc(100% - 40px);
  }

  .process-status {
    right: 20px;
    bottom: 20px;
    left: 20px;
    padding: 20px 19px 19px;
  }

  .process-status > h2 {
    font-size: 21px;
  }

  .process-overlay--conditions .detail-box--entry,
  .process-overlay--work .work-zone--chimney,
  .verified-point--d {
    display: none;
  }

  .site-stories h2 {
    font-size: clamp(37px, 10vw, 46px);
  }

  .work-share h2 {
    font-size: clamp(32px, 8.6vw, 38px);
  }

}

@media (prefers-reduced-motion: reduce) {
  .process-hero__scan {
    left: 44%;
  }

  .process-hero__canvas.is-scanning .process-hero__scan {
    animation: none;
  }

  .process-overlay,
  .share-list li,
  .share-list li::before,
  .project-print {
    transition: none;
  }

  .project-spread .project-print {
    opacity: 1;
    transform: translateX(0) translateY(var(--rise)) rotate(var(--rotation)) scale(1);
  }

  .project-spread .project-print--feature {
    transform: translateX(0) translateY(var(--rise)) rotate(var(--rotation)) scale(1.015);
  }
}
