/* This stylesheet is loaded on the Chraf project page. */
.chraf-detail {
  --project-paper:#e8e8dc;
  --project-forest:#203c31;
  --project-cream:#fbf5e5;
}
.chraf-detail .project-arrival {
  padding:0;
  position:relative;
  background:var(--project-paper);
}
.project-hero {
  position:relative;
  isolation:isolate;
  min-height:660px;
  height:100svh;
  overflow:clip;
  display:grid;
  align-items:end;
}
.project-architecture {
  position:absolute;
  inset:0;
  z-index:-2;
  container-type:size;
  overflow:hidden;
  background:#3d493d;
}
.project-photograph {
  position:absolute;
  width:max(100cqw,150cqh);
  height:max(100cqh,66.6667cqw);
  top:50%;
  left:50%;
  translate:-50% -50%;
}
.project-photograph img { position:absolute; inset:0; width:100%; height:100%; object-fit:fill }
.project-leaves { pointer-events:none }
.project-leaves-left {
  clip-path:polygon(0 0,34% 0,34% 10%,22% 11%,18% 15%,22% 24%,32% 27%,30% 44%,25% 55%,18% 65%,12% 75%,0 76%);
  mask-image:radial-gradient(ellipse 19% 39% at 10% 27%,#000 38%,#000d 58%,transparent 95%);
  transform-origin:0% 44%;
  animation:project-wind 5.7s ease-in-out infinite alternate;
}
.project-leaves-right {
  clip-path:polygon(82% 0,100% 0,100% 32%,90% 25%,86% 19%,91% 12%,80% 9%);
  mask-image:radial-gradient(ellipse 13% 22% at 98% 5%,#000 43%,#000c 69%,transparent 96%);
  transform-origin:100% 0%;
  animation:project-wind 7.1s -3s ease-in-out infinite alternate-reverse;
}
@keyframes project-wind {
  from {transform:skewY(-.45deg) translate3d(-1px,0,0)}
  to {transform:skewY(.48deg) translate3d(2px,1px,0)}
}
.project-hero::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(90deg,#15261ed9,#17292035 59%,transparent 77%),
             linear-gradient(0deg,#13251ace,transparent 45%);
}
.project-opening { padding-block:80px clamp(78px,12svh,145px) }
.chraf-detail .project-opening h1 {
  font-size:clamp(84px,12vw,188px);
  line-height:.83;
  letter-spacing:-.045em;
}
.chraf-detail .project-opening .eyebrow { margin:28px 0 12px }
.project-opening .back { display:inline-block; color:var(--project-cream) }
.project-tour-button {
  background:#dccf9d;
  color:#20392f;
  border:1px solid #dccf9d;
  transition:transform .24s,background .24s;
}
.project-tour-button:is(:hover,:focus-visible) {transform:translateY(-2px);background:#f4e7b7}
.project-opening .project-tour-button {margin-left:.5rem}
.project-selection .unit-actions .visit-panorama {background:#274536;color:#fbf5e5}
.project-selection .unit-actions .visit-panorama:is(:hover,:focus-visible) {background:#395e49}
.project-intro-note { max-width:37ch; margin:24px 0; color:var(--project-cream) }
.project-photo-credit { position:absolute; bottom:20px; left:0; right:0; font-size:.72rem; text-align:right }
.project-arch { position:absolute; inset:0; pointer-events:none; display:none; background:var(--project-paper) }
.project-arch-copy {
  position:absolute;
  inset:46% 0 auto;
  color:var(--project-forest);
}
.project-arch-copy .eyebrow {color:#496450;margin-bottom:12px}
.project-arch-copy p:last-child {font:clamp(55px,8.8vw,129px)/.89 var(--title);letter-spacing:-.038em}
.project-arch-copy em {color:#546f55}
.project-selection {
  position:relative;
  padding-block:clamp(55px,10vw,145px);
  background:var(--project-paper);
}
.project-selection-title {
  display:grid;
  grid-template-columns:1fr 3fr;
  align-items:start;
  gap:2rem;
  margin-bottom:clamp(30px,5vw,74px);
}
.project-selection-title .eyebrow { padding-top:.85rem; border-top:1px solid #38574a78; max-width:220px }
.project-selection-title h2,.project-materials h2 {
  font-size:clamp(57px,9.6vw,145px);
  margin:0;
}
.project-selection-title em,.project-materials em { color:#546f55 }
.project-selection .floor-buttons { padding-bottom:16px; border-bottom:1px solid #38574a55 }
.project-selection .floor-buttons button { min-height:46px }
.project-selection .units {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:clamp(20px,3vw,50px)}
.project-selection .unit {
  border:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  padding:0 0 20px;
  align-content:start;
}
.project-selection .unit-image { 
  width:100%;height:clamp(250px,35vw,510px);
  background:#c8c4b1;
  object-fit:cover;
  object-position:center 56%;
  border-radius: clamp(65px,12vw,210px) clamp(65px,12vw,210px) 2px 2px / 18% 18% 2px 2px;
}
.project-selection .units:has(.unit:only-child) .unit {
  grid-template-columns:minmax(0,1.28fr) minmax(0,1fr);
  column-gap:clamp(32px,7vw,106px);
  align-items:center;
}
.project-selection .unit:only-child .unit-image { grid-row:span 2 }
.project-selection .unit h3 { margin-top:.42em; color:var(--project-forest) }
.project-selection .unit-actions { align-self:start; margin-top:14px }
.project-selection .unit-actions button {min-height:42px}
.project-materials { padding-block:clamp(52px,10vw,145px); background:#eee8db; overflow:clip }
.project-materials-grid { display:grid;grid-template-columns:1fr .86fr .78fr;gap:clamp(21px,4vw,75px);align-items:center }
.project-materials .eyebrow { margin-bottom:14px }
.project-materials h2 { font-size:clamp(56px,7vw,102px); margin-bottom:20px }
.project-materials img { width:100%; height:clamp(290px,41vw,590px); object-fit:cover }
.project-materials figure:last-child { margin-top:clamp(28px,10vw,150px) }
.project-materials figcaption { font-size:.74rem; color:#486052; padding-top:10px }
.chraf-detail .visit { background:var(--project-forest) }
.chraf-detail .mast {
  position:fixed;
  inset:0 0 auto;
  background:linear-gradient(180deg,#17281fe0,transparent);
  transition:background .3s,color .3s;
}
.chraf-detail .scene { overflow:clip }
.chraf-detail .unit img,
.chraf-detail .project-materials figure { transform-origin:50% 65% }
html[data-motion=quiet] .project-leaves { display:none }
.project-hero.is-offscreen .project-leaves {animation-play-state:paused}
.project-selection .unit-source {font-size:.72rem;color:#526257;margin-top:.6em}
html:not([data-motion=quiet]) .project-opening h1 { animation:project-title-in .92s .08s var(--ease) both }
html:not([data-motion=quiet]) .project-selection .unit { animation:project-title-in .52s var(--ease) both }
@keyframes project-title-in { from { opacity:0;transform:translate3d(0,24px,0) } }
@supports (animation-timeline:view()) and (animation-range:contain 0% contain 100%) {
  html[data-motion=full] .project-arrival {height:161svh;view-timeline:--project block}
  html[data-motion=full] .project-hero {position:sticky;top:0}
  html[data-motion=full] .project-arch {
    display:block;
    animation:project-iris both linear;
    animation-timeline:--project;
    animation-range:contain 12% contain 100%;
  }
  html[data-motion=full] .project-opening {
    animation:project-opening-away both linear;
    animation-timeline:--project;
    animation-range:contain 32% contain 86%;
  }
  html[data-motion=full] .project-arch-copy {
    animation:project-arch-copy both linear;
    animation-timeline:--project;
    animation-range:contain 35% exit 25%;
  }
  html[data-motion=full] :is(.project-materials figure,.project-selection-title,.chraf-detail .visit-top) {
    animation:project-title-in both linear;
    animation-timeline:view();
    animation-range:entry 12% cover 30%;
  }
}
@keyframes project-iris {
  0% {clip-path:ellipse(19% 0% at 39% 104%)}
  54% {clip-path:ellipse(75% 64% at 44% 102%)}
  100% {clip-path:ellipse(143% 155% at 49% 100%)}
}
@keyframes project-opening-away { to {transform:translate3d(0,-22px,0);opacity:0} }
@keyframes project-arch-copy {
  0% {opacity:0;transform:translateY(20px)}
  35%,74% {opacity:1;transform:none}
  100% {opacity:0;transform:translateY(-8px)}
}
@media(max-width:740px) {
  .project-hero {min-height:540px}
  .project-opening {padding-bottom:82px}
  .project-opening .project-tour-button {margin:.65rem .45rem 0 0}
  .chraf-detail .project-opening h1 {font-size:clamp(69px,17vw,105px)}
  .project-selection-title {grid-template-columns:1fr;gap:12px}
  .project-selection-title .eyebrow {max-width:158px}
  .project-selection .units:has(.unit:only-child) .unit {grid-template-columns:1fr}
  .project-selection .unit:only-child .unit-image {grid-row:auto}
  .project-materials-grid {grid-template-columns:1fr 1fr;align-items:start}
  .project-materials-grid>div {grid-column:1/-1}
  .project-materials img {height:clamp(205px,64vw,400px)}
}
@media(max-width:740px) and (orientation:portrait) {
  .project-photograph {left:46cqh}
}
@media(max-height:650px) {
  .project-hero {min-height:0}
  .project-opening {padding-block:70px 48px}
  .chraf-detail .project-opening .eyebrow {margin-top:12px}
  .chraf-detail .project-opening h1 {font-size:clamp(53px,13vh,100px)}
  .project-intro-note {margin-block:12px}
}
