/* ARES — motion layer (test build).
   Everything here is driven by one custom property, --p (0 → 1), that motion.js
   sets from scroll position. Without JavaScript, or when the visitor asks for
   reduced motion, every element rests in its finished, readable state. */

html.motion-on{scroll-behavior:smooth}

/* ---------- 1 · Signature intro: the ARES mark draws itself, then the film shows through it ---------- */
.intro{position:relative;--p:0}
html.motion-on .intro{height:175svh}
.intro .intro-stick{position:sticky;top:0;height:100svh;min-height:0;overflow:hidden;clip-path:inset(0)}
html:not(.motion-on) .intro .intro-stick{position:relative}
.intro .hero-in{
  opacity:clamp(0, calc(1 - var(--p) * 7), 1);
  transform:translateY(calc(var(--p) * -140px));
  filter:blur(clamp(0px, calc(var(--p) * 70px), 10px));
}
.intro .vid-toggle{opacity:clamp(0, calc(1 - var(--p) * 7), 1)}
.intro .hero-media::after{opacity:calc(1 - .55 * clamp(0, calc((var(--p) - .36) / .2), 1))}
.intro-mark{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:1;pointer-events:none;
  transform:scale(calc(1 + .04 * clamp(0, calc((var(--p) - .72) / .2), 1)));transform-origin:50% 48%}
.im-line{fill:none;stroke:var(--ivory);stroke-width:2.2;stroke-linejoin:round;
  stroke-dasharray:2600px;stroke-dashoffset:calc(2600px * (1 - clamp(0, calc((var(--p) - .04) / .28), 1)));
  opacity:min(clamp(0, calc((var(--p) - .03) * 25), 1), clamp(0, calc((.62 - var(--p)) / .12), 1))}
.im-text{font-family:var(--serif);font-weight:400;font-size:330px;letter-spacing:34px}
.im-panel{fill:var(--ivory);opacity:clamp(0, calc((var(--p) - .36) / .2), 1)}
.im-rule{stroke:var(--burg);stroke-width:2;opacity:clamp(0, calc((var(--p) - .56) / .1), 1)}
.im-tag{font-family:var(--sans);font-weight:500;font-size:44px;letter-spacing:16px;fill:var(--burg);
  opacity:clamp(0, calc((var(--p) - .56) / .1), 1)}
.im-sub{font-family:var(--serif);font-style:italic;font-size:40px;fill:var(--ink);
  opacity:clamp(0, calc((var(--p) - .62) / .1), 1)}
.intro-cue{position:absolute;left:50%;bottom:1.4rem;z-index:3;transform:translateX(-50%);
  display:flex;flex-direction:column;align-items:center;gap:.5rem;color:var(--ivory);
  font:500 .6875rem/1 var(--sans);letter-spacing:.24em;text-transform:uppercase;
  opacity:clamp(0, calc(1 - var(--p) * 10), 1)}
.intro-cue::after{content:"";width:1px;height:38px;background:linear-gradient(var(--ivory),transparent);animation:cue 2s var(--ease) infinite}
@keyframes cue{0%{transform:scaleY(0);transform-origin:top}50%{transform:scaleY(1);transform-origin:top}51%{transform-origin:bottom}100%{transform:scaleY(0);transform-origin:bottom}}
html:not(.motion-on) .intro-mark,html:not(.motion-on) .intro-cue{display:none}
@media (max-width:760px){html.motion-on .intro{height:155svh}.im-tag{font-size:54px;letter-spacing:14px}.im-sub{font-size:52px}}

/* ---------- 2 · Headlines sharpen into focus, word by word ---------- */
html.motion-on .bw{display:inline-block;opacity:0;filter:blur(14px);transform:translateY(.18em);
  animation:sharpen 1.15s var(--ease) forwards;animation-delay:calc(220ms + var(--i) * 85ms)}
@keyframes sharpen{to{opacity:1;filter:blur(0);transform:none}}

/* ---------- 3 · Text that darkens as you read ---------- */


/* ---------- 4 · Photographs open like a curtain, with gentle depth ---------- */
html.motion-on .mr{clip-path:inset(14% 10% 14% 10%);transition:clip-path 1.5s var(--ease)}
html.motion-on .mr.in{clip-path:inset(0 0 0 0)}
html.motion-on .px img{transform:translateY(calc((var(--p) - .5) * -4%)) scale(1.05)}

/* ---------- 5 · Lists light up one step at a time ---------- */


/* ---------- 6 · Header steps aside while you read, returns when you look up ---------- */
.hdr{transition:background .35s var(--ease),box-shadow .35s var(--ease),color .35s var(--ease),transform .45s var(--ease)}
html.motion-on .hdr.tuck{transform:translateY(-100%)}

/* ---------- 7 · Roofline gallery ---------- */
.roofs{overflow:hidden}
.roofs-h{text-align:center;max-width:22ch;margin:0 auto clamp(2.5rem,5vw,4rem)}
.roof-strip{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:clamp(.75rem,1.6vw,1.5rem);--p:1}
.roof-strip li{--i:0;
  opacity:clamp(0, calc(var(--p) * 2.2 - var(--i) * .35), 1);
  transform:translateY(calc((1 - clamp(0, calc(var(--p) * 2.2 - var(--i) * .35), 1)) * 90px))}
.roof-strip li:nth-child(2){--i:1}.roof-strip li:nth-child(3){--i:2}.roof-strip li:nth-child(4){--i:3}
.roof{margin:0;aspect-ratio:3/4;position:relative;overflow:hidden;
  clip-path:polygon(50% 0, 100% 28%, 100% 100%, 0 100%, 0 28%)}
.roof img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.roof figcaption{position:absolute;left:0;right:0;bottom:0;padding:1rem;color:var(--ivory);
  font:500 .6875rem/1.3 var(--sans);letter-spacing:.2em;text-transform:uppercase;
  background:linear-gradient(transparent,rgba(15,11,11,.65))}
.roofs-sub{text-align:center;max-width:46ch;margin:clamp(2.5rem,5vw,4rem) auto 0}
@media (max-width:760px){.roof-strip{grid-template-columns:1fr 1fr}}

/* ---------- 8 · Own / Fund / Build in oversized type ---------- */
.bw-rows{list-style:none;border-top:1px solid var(--hair-dk)}
.bw-rows li{--p:1;display:grid;grid-template-columns:3rem minmax(0,22rem) 1fr;gap:clamp(1rem,3vw,3rem);align-items:center;
  padding:clamp(1.75rem,4vw,3rem) 0;border-bottom:1px solid var(--hair-dk);overflow:hidden}
.bw-n{width:2.4rem;height:2.4rem;border:1px solid rgba(249,241,231,.5);border-radius:50%;display:flex;align-items:center;justify-content:center;
  font:500 .8125rem/1 var(--sans);color:var(--ivory)}
.bw-txt .co{font:500 .75rem/1.4 var(--sans);letter-spacing:.18em;text-transform:uppercase;color:var(--burg-lt);margin:0 0 .5rem}
.bw-txt p{color:rgba(249,241,231,.86);margin:0 0 .9rem}
.bw-word{font:400 clamp(4.5rem,2rem + 11vw,12.5rem)/.9 var(--serif);color:var(--ivory);letter-spacing:-.02em;white-space:nowrap;
  opacity:calc(.12 + .88 * clamp(0, var(--p), 1));
  transform:translateX(calc((1 - clamp(0, var(--p), 1)) * 35%))}
.bw-rows li:hover .bw-word{color:var(--burg-lt)}
@media (max-width:760px){.bw-rows li{grid-template-columns:2.6rem 1fr}.bw-word{grid-column:1/-1;font-size:clamp(4rem,22vw,7rem)}}

/* ---------- reduced motion: everything rests, nothing moves ---------- */
@media (prefers-reduced-motion:reduce){
  .roof-strip li,.bw-word{opacity:1!important;transform:none!important}
}
.px{overflow:hidden}

/* ---------- 9 · Image-led motion: cards rise into place, photos settle from a gentle zoom ---------- */
html.motion-on .rise{opacity:0;transform:translateY(48px);transition:opacity 1s var(--ease),transform 1.2s var(--ease);transition-delay:calc(var(--k, 0) * 110ms)}
html.motion-on .rise.in{opacity:1;transform:none}
html.motion-on .mr img{transform:scale(1.06);transition:transform 1.6s var(--ease)}
html.motion-on .mr.in img{transform:scale(1)}
html.motion-on .px.mr.in img{transform:translateY(calc((var(--p) - .5) * -4%)) scale(1.05);transition:none}

.intro + .sec{padding-top:clamp(2.5rem,5vw,4rem)}

/* scroll cue sits below the hero's location line, never on top of it */
.intro-cue{bottom:.5rem;gap:.35rem}
.intro-cue::after{height:26px}
.intro .hero-in{padding-bottom:clamp(5.25rem,11vh,7.5rem)}
@media (max-width:760px){.intro .hero-in{padding-bottom:5.5rem}}

/* ---------- hero fits every screen: phones, Windows laptops, short browser windows ---------- */
.hero h1{font-size:clamp(2.1rem, min(1.35rem + 5vw, 10.5vh), 5.75rem)}
@media (max-height:820px){
  .hero-in{padding-top:calc(var(--hdr-h) + 14px)}
  .hero .eyebrow{margin-bottom:.9rem}
  .hero .lede{margin-top:1rem;font-size:clamp(1rem,.95rem + .3vw,1.15rem)}
  .hero .actions{margin-top:1.25rem}
  .hero .hero-meta{margin-top:1.25rem;padding-top:.8rem}
}
@media (max-height:680px){.hero .hero-meta{display:none}.intro .hero-in{padding-bottom:4rem}}
@media (max-width:760px){
  .hero .hero-meta{display:none}
  .intro .hero-in{padding-bottom:4.25rem}
  .hero .lede{font-size:1rem;line-height:1.5}
  .hero .actions .btn{min-height:46px;padding:.7rem 1.1rem;font-size:.875rem}
}
@media (max-width:760px){
  .intro-cue{display:none}
  .vid-toggle{bottom:auto;top:calc(var(--hdr-h) + .5rem);right:var(--gut);min-height:36px;padding:0 .6rem;background:rgba(15,11,11,.35)}
  .vid-toggle span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}
@media (max-height:680px){.intro-cue{display:none}}
