/* spydrhaus homepage, the abstract run: an opening curtain, a card that grows out of the
   corner and gets cut open by shapes, a statement that lights up word by word, and
   the work sliding up over one pinned word. All movement is tied to scroll, except the curtain. */



/* the hero stays pinned underneath while the card grows over it */
.hero { position: relative; height: 300vh; height: 300svh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* shards: a pinned stage; the card is clipped by JS (inset), each project layer by a shape */
.shards { position: relative; z-index: 2; height: 460vh; height: 460svh; margin-top: -300vh; margin-top: -300svh; pointer-events: none; }
.sh-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.sh-card { position: absolute; inset: 0; background: var(--night); clip-path: inset(100% 100% 0 0); }
.sh-layer { position: absolute; inset: 0; clip-path: polygon(50% 50%, 50% 50%, 50% 50%); }
.sh-layer:first-child { clip-path: none; }
.sh-layer img, .sh-layer video { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(var(--z, 1.08)); }
.sh-name { position: absolute; left: 0; top: 50%; margin: 0; font: 800 clamp(90px, 20vw, 380px)/.9 var(--display); letter-spacing: -.055em; white-space: nowrap; color: #fff; mix-blend-mode: difference; transform: translate3d(110vw, -50%, 0); will-change: transform; }
.sh-pill { position: absolute; bottom: clamp(18px, 3vh, 28px); display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid var(--silk); border-radius: 999px; color: var(--silk); font: 600 13px/1 var(--body); text-decoration: none; pointer-events: auto; opacity: var(--pill, 0); transition: background .2s, color .2s; }
.sh-pill:hover { background: var(--silk); color: var(--night); }
.sh-go { left: 50%; transform: translateX(-50%); }
.sh-talk { right: var(--gut); }
html:not(.js) .shards { height: 100svh; margin-top: 0; }
html:not(.js) .sh-card { clip-path: none; }

/* statement: words light up as you pass, over a drifting glossy full stop */
.say { position: relative; height: 340vh; height: 340svh; }
.say-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.say-dot { position: absolute; left: 50%; top: 50%; width: min(70vmin, 640px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #ffe3f6 0, #ff8ddc 9%, #ff5ccf 22%, #8a2373 46%, #2a0d26 66%, rgba(10, 7, 11, 0) 72%); filter: blur(.5px) saturate(1.05); opacity: .78; transform: translate(calc(-50% + var(--dx, 30vw)), calc(-50% + var(--dy, 30vh))) scale(var(--ds, .4)) rotate(var(--dr, 0deg)); will-change: transform; }
.say-web { position: absolute; left: 50%; top: 50%; width: max(100vw, 130vh); height: max(100vh, 80vw); transform: translate(-50%, -50%) rotate(var(--spin, 0deg)); pointer-events: none; }
.say-web { opacity: var(--web, 0); -webkit-mask-image: radial-gradient(ellipse 46% 50% at 50% 50%, #000 35%, transparent 100%); mask-image: radial-gradient(ellipse 46% 50% at 50% 50%, #000 35%, transparent 100%); }
.say-web path { fill: none; stroke: var(--silk); stroke-width: .18; stroke-linecap: round; }
.sw-spokes path { opacity: .16; }
.say-web .sw-spiral { opacity: .26; }
.sw-dew circle { fill: var(--silk); opacity: calc(var(--dew, 0) * .7); }
.sw-hub { fill: var(--pink); opacity: calc(var(--dew, 0)); }
@media (prefers-reduced-motion: reduce) { .say-web { opacity: 1; } .sw-dew circle, .sw-hub { opacity: .6; } }
.say-text { position: relative; max-width: 24ch; margin: 0; padding: 0 var(--gut); text-align: center; font: 700 clamp(30px, 4.4vw, 70px)/1.06 var(--display); letter-spacing: -.035em; color: var(--silk); text-wrap: balance; }
.say-text .w { opacity: .16; transition: opacity .25s; }
.say-text .w.on { opacity: 1; }

/* work: one pinned giant word, cards slide up across it */
/* the work arrives as one panel sliding up over the pinned statement */
.work { position: relative; z-index: 3; margin-top: -100vh; margin-top: -100svh; background: var(--night-2); border-radius: clamp(20px, 3vw, 44px) clamp(20px, 3vw, 44px) 0 0; box-shadow: 0 -1px 0 var(--line-2), 0 -40px 80px rgba(0, 0, 0, .5); padding-bottom: 20vh; }
.work + * , .work ~ .foot { position: relative; z-index: 3; }
.work-word { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: start center; padding-top: clamp(84px, 13vh, 150px); overflow: hidden; }
.work-word span { font: 800 clamp(80px, 21.6vw, 420px)/.8 var(--display); letter-spacing: -.065em; color: var(--silk); white-space: nowrap; }
.work-word i { font-style: normal; color: var(--pink); }
.wcards { position: relative; z-index: 1; list-style: none; margin: -55vh 0 0; padding: 0 var(--gut); display: grid; gap: 34vh; }
.wc { position: relative; width: min(660px, 84vw); margin: 0 auto; transform: translateX(var(--x)); border-radius: clamp(12px, 1.4vw, 20px); overflow: hidden; background: var(--night-2); box-shadow: 0 40px 80px rgba(0, 0, 0, .45); }
.wc-link { display: block; aspect-ratio: 16 / 10; }
.wc-link img, .wc-link video { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.wc-link:hover img, .wc-link:hover video { transform: scale(1.05); }
.wc-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 18px; background: linear-gradient(transparent, rgba(10, 7, 11, .92) 55%); pointer-events: none; }
.wc-meta h3 { margin: 0 0 6px; font: 800 clamp(26px, 2.8vw, 40px)/1 var(--display); letter-spacing: -.035em; }
.wc-meta p { margin: 0 0 12px; max-width: 46ch; font-size: 15px; line-height: 1.45; color: var(--silk); opacity: .82; }
.wc-meta .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; justify-content: flex-start; }
.wc-meta .tags span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border: 1px solid rgba(236, 230, 221, .4); border-radius: 999px; font-size: 13px; }
.wc-meta .tag-hot { pointer-events: auto; min-height: 28px; font-size: 13px; }
@media (max-width: 700px) {
  /* phones: nothing pinned behind the cards. "Work." is a plain heading, the cards stack
     close together, and the statement run is shorter so there are no long empty stretches */
  .say { height: 210svh; margin-top: -18svh; }
  /* "Work." stays on screen and sinks from under the header to the bottom edge as the cards
     glide over it (abstract.js sets --wy from the scroll position) */
  .work { padding-bottom: 0; }
  .work-word { padding-top: 84px; place-items: start center; }
  .work-word span { font-size: 21vw; transform: translate3d(0, var(--wy, 0px), 0) scale(var(--ws, 1)); transform-origin: 50% 100%; will-change: transform; }
  .wcards { margin-top: calc(-100svh + 84px + 23vw); margin-bottom: 0; padding-bottom: calc(23vw + 40px); gap: 11svh; }
  .wc { width: 88%; transform: translateX(calc(var(--x) * .2)); }
  .wc-meta p { display: none; }
  .reel { padding-top: 56px; padding-bottom: 0; }
}

/* the round "View" label (copied from page styles so the homepage has it too) */
.view-cursor { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; will-change: transform; }
.view-cursor span { display: grid; place-items: center; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--silk); color: var(--night); font: 600 14px/1 var(--body); transform: scale(0); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.view-cursor.on span { transform: scale(1); }
