/* Good Noise — shared motion layer (every page): first-visit intro, page curtain, premium cursor,
   smooth scroll, next-project card. Paired with assets/fx.js. */

/* smooth scroll (Lenis) */
html.lenis, html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto !important}
.lenis.lenis-stopped{overflow:hidden}

/* before first paint on a page reached through the curtain: stay black (set by the inline head snippet) */
html.tx-in::after{content:"";position:fixed;inset:0;background:#070707;z-index:95}

/* ── seal mark used by the intro and the curtain ── */
.fx-seal{width:140px;height:140px}
.fx-seal .r1,.fx-seal .r2{fill:none;stroke:url(#fxg)}

/* ── first visit: the seal draws itself ── */
.fx-intro{position:fixed;inset:0;z-index:100;background:#070707;display:grid;place-items:center;transition:opacity .4s cubic-bezier(.16,1,.3,1),visibility .4s}
.fx-intro.out{opacity:0;visibility:hidden}
.fx-intro .r1,.fx-intro .r2{stroke-dasharray:300;stroke-dashoffset:300;animation:fxdraw .55s cubic-bezier(.16,1,.3,1) forwards}
.fx-intro .r2{animation-delay:.06s}
.fx-intro .bars{opacity:0;animation:fxpop .3s .22s cubic-bezier(.16,1,.3,1) forwards;transform-origin:50% 50%}
.fx-intro .word,.fx-curtain .word{font-family:"JetBrains Mono",monospace;font-size:11px;letter-spacing:.5em;padding-left:.5em;color:#f1e3cc;text-align:center;margin-top:26px}
.fx-intro .word{opacity:0;animation:fxpop .35s .28s cubic-bezier(.16,1,.3,1) forwards}
@keyframes fxdraw{to{stroke-dashoffset:0}}
@keyframes fxpop{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:none}}

/* ── page curtain: wipes up over the page on the way out, lifts away on the way in ── */
.fx-curtain{position:fixed;inset:0;z-index:96;background:#070707;display:grid;place-items:center;pointer-events:none;
  transform:translateY(100%);transition:transform .38s cubic-bezier(.76,0,.24,1)}
.fx-curtain::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:linear-gradient(90deg,transparent,#c9a27a,transparent)}
.fx-curtain .inner{opacity:0;transform:translateY(24px);transition:opacity .22s .06s,transform .32s .04s cubic-bezier(.16,1,.3,1);text-align:center}
.fx-curtain .fx-seal{width:96px;height:96px;animation:fxspin 9s linear infinite}
.fx-curtain.cover{transform:none;pointer-events:auto}
.fx-curtain.cover .inner{opacity:1;transform:none}
.fx-curtain.lift{transform:translateY(-100%)}
.fx-curtain.lift .inner{opacity:0;transform:translateY(-24px);transition-delay:0s}
.fx-curtain.instant{transition:none}
@keyframes fxspin{to{transform:rotate(-360deg)}}

/* ── cursor (mouse only) ── */
.cdot,.cring{position:fixed;left:0;top:0;z-index:99;pointer-events:none;opacity:0;will-change:transform}
.cdot{width:6px;height:6px;margin:-3px 0 0 -3px;border-radius:50%;background:#f1e3cc;box-shadow:0 0 12px #f1e3cc88;transition:opacity .35s,width .4s cubic-bezier(.16,1,.3,1),height .4s cubic-bezier(.16,1,.3,1),margin .4s cubic-bezier(.16,1,.3,1)}
.cring{width:38px;height:38px;margin:-19px 0 0 -19px;border-radius:50%;border:1px solid #c9a27a8c;
  transition:width .7s cubic-bezier(.16,1,.3,1),height .7s cubic-bezier(.16,1,.3,1),margin .7s cubic-bezier(.16,1,.3,1),border-color .5s,background .6s,opacity .4s,box-shadow .6s}
.cring .lens{position:absolute;inset:0;display:grid;place-items:center;opacity:0;transform:scale(.7);transition:opacity .45s,transform .7s cubic-bezier(.16,1,.3,1)}
.cring .ico{display:flex;flex-direction:column;align-items:center;gap:6px}
.cring .ico b{font-weight:400;font-family:"JetBrains Mono",monospace;font-size:9.5px;letter-spacing:.42em;padding-left:.42em;color:#f1e3cc}
.cring .ico i{display:block;color:#f1e3cc;font-style:normal;font-size:13px;line-height:1}
.cring .ico i.tri{width:0;height:0;border-left:10px solid #f1e3cc;border-top:6.5px solid transparent;border-bottom:6.5px solid transparent;margin-left:3px}
.cring svg{position:absolute;inset:6px;width:calc(100% - 12px);height:calc(100% - 12px);animation:cspin 14s linear infinite;opacity:.9}
@keyframes cspin{to{transform:rotate(360deg)}}
.cur-on .cdot,.cur-on .cring{opacity:1}
.cur-link .cring{width:56px;height:56px;margin:-28px 0 0 -28px;border-color:#c9a27a}
.cur-link .cdot{width:4px;height:4px;margin:-2px 0 0 -2px}
.cur-big .cring{width:118px;height:118px;margin:-59px 0 0 -59px;border-color:#f1e3cc66;background:#0707074d;
  -webkit-backdrop-filter:blur(10px) saturate(1.4);backdrop-filter:blur(10px) saturate(1.4);box-shadow:0 10px 40px #0008,inset 0 0 0 1px #c9a27a33,inset 0 0 30px #c9a27a1f}
.cur-big .cring .lens{opacity:1;transform:none}
.cur-big .cdot{opacity:0}
.cur-down .cring{width:30px;height:30px;margin:-15px 0 0 -15px}
.cur-big.cur-down .cring{width:104px;height:104px;margin:-52px 0 0 -52px}
@media (pointer:fine){ html.cur-ready, html.cur-ready a, html.cur-ready button, html.cur-ready [data-cur], html.cur-ready video{cursor:none} }
@media (prefers-reduced-motion:reduce){ .cring svg,.fx-curtain .fx-seal{animation:none} }

/* ── next project ── */
.fx-next{display:block;position:relative;margin:0 auto;width:min(1180px,calc(100vw - 48px));padding:40px 0 120px}
.fx-next .lbl{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid #2a241d;padding-top:22px;font-family:"JetBrains Mono",monospace;font-size:11px;letter-spacing:.42em;color:#c9a27a;text-transform:uppercase}
.fx-next .lbl span:last-child{color:#8d8273;letter-spacing:.25em}
.fx-next .t{font-family:"Instrument Serif",Georgia,serif;font-size:clamp(64px,13vw,190px);line-height:.9;letter-spacing:-.035em;color:#f1e3cc;margin:26px 0 10px;transition:color .6s}
.fx-next .t em{font-style:italic;color:#c9a27a}
.fx-next .row{display:grid;grid-template-columns:1.5fr 1fr;gap:34px;align-items:end}
.fx-next .media{position:relative;overflow:hidden;border:1px solid #2a241d;aspect-ratio:16/9;background:#000}
.fx-next.tall .media{aspect-ratio:16/9}
.fx-next .media img,.fx-next .media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform 1.6s cubic-bezier(.16,1,.3,1),opacity .8s}
.fx-next.tall .media video,.fx-next.tall .media .fg{object-fit:contain}
.fx-next.tall .media .bg{filter:blur(26px) brightness(.45);transform:scale(1.2)}
.fx-next .media video{opacity:0}
.fx-next .media video.live{opacity:1}
.fx-next:hover .media img,.fx-next:hover .media video{transform:scale(1.03)}
.fx-next .side p{color:#8d8273;font-size:15px;line-height:1.75}
.fx-next .side .go{margin-top:26px;display:inline-flex;gap:14px;align-items:center;font-family:"JetBrains Mono",monospace;font-size:11px;letter-spacing:.32em;color:#f1e3cc;text-transform:uppercase;border-bottom:1px solid #c9a27a;padding-bottom:8px}
.fx-next:hover .t{color:#fff}
@media (max-width:900px){ .fx-next .row{grid-template-columns:1fr} .fx-next{padding-bottom:80px} }
