/* =========================================================
   Opening animation (home) — runs at 3x speed; Source Sans Pro only
   Collage: crowd in duotone + graph paper + three data lines,
   which then hangs on the wall beside exhibition-style title type.
   ========================================================= */
.intro-on, .intro-on body { overflow: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 200;
  background: #E9E8E3; color: #141414;
  transition: transform .334s cubic-bezier(.7,0,.2,1);
}
.intro.is-leaving { transform: translateY(-100%); }

.intro-art {
  position: absolute; inset: 0; overflow: hidden;
  background: #8EC3DE;
  clip-path: inset(0 0 0 0);
  transition: clip-path .4s cubic-bezier(.7,0,.2,1);
}
.intro-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.55) brightness(1.08);
  mix-blend-mode: multiply;
  opacity: 0; transform: scale(1.12);
  transition: opacity .334s ease, transform 1.5s cubic-bezier(.2,.7,.2,1);
}
.intro.s1 .intro-art img { opacity: 1; transform: scale(1); }
/* graph paper, revealed by a sweep from the left */
.intro-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,14,18,.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,14,18,.55) 1px, transparent 1px);
  background-size: 22px 22px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .366s cubic-bezier(.6,0,.2,1) .084s;
}
.intro.s1 .intro-grid { clip-path: inset(0 0 0 0); }
.intro-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(-20px 100% -20px -20px); }
.intro-lines path { fill: none; stroke-width: 9; stroke-linejoin: miter; stroke-linecap: butt; vector-effect: non-scaling-stroke; }

/* the collage becomes a framed piece on the wall */
.intro.s2 .intro-art { clip-path: inset(13vh 6vw 13vh 56vw); }

.intro-wall {
  position: absolute; left: 6vw; right: 46vw; top: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: center;
}
.intro-title {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: clamp(3rem, 6vw, 7rem); line-height: .9; letter-spacing: -0.02em;
  margin: 0; color: #141414;
}
.intro-title > span { display: flex; align-items: flex-end; gap: .2em; overflow: hidden; padding-bottom: .04em; white-space: nowrap; }
.intro-title > span > span { display: block; transform: translateY(105%); transition: transform .334s cubic-bezier(.2,.7,.2,1); }
.intro-l2 > span { transition-delay: .04s !important; }
.intro-title small {
  display: flex; flex-direction: column;
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif; font-weight: 400; letter-spacing: -0.01em;
  font-size: .25em; line-height: .92; color: #9BB0DE;
  padding-bottom: .38em;
}
.intro-title small span { display: block; transform: translateY(140%); opacity: 0; transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .2s; }
.intro-title small span + span { transition-delay: .034s; }
.intro-note {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif; font-size: clamp(.95rem, 1.1vw, 1.1rem); line-height: 1.5;
  max-width: 34ch; margin: clamp(28px, 4vh, 48px) 0 0 auto; margin-left: 0;
  opacity: 0; transform: translateY(12px); transition: opacity .266s ease .166s, transform .266s ease .166s;
}
.intro.s3 .intro-title > span > span { transform: translateY(0); }
.intro.s3 .intro-title small span { transform: translateY(0); opacity: 1; transition-delay: .116s; }
.intro.s3 .intro-title small span + span { transition-delay: .15s; }
.intro.s3 .intro-note { opacity: 1; transform: none; }

.intro-skip {
  position: absolute; right: 24px; bottom: 22px; z-index: 5;
  font: 500 12px/1 "Source Sans Pro", "Source Sans 3", sans-serif; letter-spacing: .16em; text-transform: uppercase;
  background: rgba(10,10,11,.75); color: #fff; border: 0; padding: 12px 16px; cursor: pointer;
}
.intro-skip:hover { background: #FF5B22; }

/* part two: the framed collage dissolves into dots, then into the portrait */
.intro-dots { position: absolute; z-index: 2; visibility: hidden; pointer-events: none; }
.intro.d-on .intro-dots { visibility: visible; }
.intro.d-on .intro-art { visibility: hidden; }
.intro.p-on .intro-dots { visibility: hidden; }
.intro-portrait {
  position: absolute; inset: 0; z-index: 3; overflow: hidden; visibility: hidden;
  clip-path: inset(13vh 6vw 13vh 56vw);
  transition: clip-path .4s cubic-bezier(.7,0,.2,1);
}
.intro-portrait img {
  position: absolute; max-width: none; transform-origin: 0 0;
  transition: transform .4s cubic-bezier(.7,0,.2,1);
}
.intro.p-on .intro-portrait { visibility: visible; }
.intro.p-full .intro-portrait { clip-path: inset(0 0 0 0); }
/* the final image: open to full screen slowly, settle, then lift away slowly */
.intro.p-full .intro-portrait { transition-duration: 1.8s; transition-timing-function: cubic-bezier(.33,0,.15,1); }
.intro.p-full .intro-portrait img { transition-duration: 1.8s; transition-timing-function: cubic-bezier(.33,0,.15,1); }
.intro.p-full.is-leaving { transition-duration: 1s; }

@media (max-width: 760px) {
  .intro.s2 .intro-art { clip-path: inset(9vh 6vw 50vh 6vw); }
  .intro-portrait { clip-path: inset(9vh 6vw 50vh 6vw); }
  .intro-wall { left: 6vw; right: 6vw; top: 52vh; bottom: 10vh; justify-content: flex-start; }
  .intro-title { font-size: clamp(2.4rem, 12.5vw, 4.2rem); }
  .intro-note { margin-top: 20px; }
}

/* keep site-wide img/h2 rules from leaking into the opening */
.intro img { display: block; }
.intro-art img { max-width: none; }
