/* =========================================================
   sticky-grid.css — the showstopper section
   ---------------------------------------------------------
   Theo Plawinski-style sticky grid scroll for the agency
   portfolio. .block is the tall scroll container; the
   .block__wrapper inside it is pinned for the duration of
   the choreography. .content (title + description + CTA)
   sits centered; the .gallery is the 12-image grid.
   ========================================================= */

.block.block--main {
  position: relative;
  height: 425vh;               /* drives the timeline length */
  background: var(--bg-primary);
}

.block__wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0 24rem;
  overflow: visible;
  will-change: transform;
}

/* Subtle gold haze behind the grid, matches the rest of the page */
.block__wrapper::before {
  content: "";
  position: absolute;
  inset: -10% auto auto -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(140rem);
  opacity: 0.4;
  pointer-events: none;
}
.block__wrapper::after {
  content: "";
  position: absolute;
  bottom: -10%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(140rem);
  opacity: 0.35;
  pointer-events: none;
}

/* ---------------- Centered text content ---------------- */
.content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  text-align: center;
  z-index: 2;
  pointer-events: none;       /* gallery sits behind; only the button needs hits */
}

.content__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56rem, 8vw, 112rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 24rem;
  text-transform: uppercase;
}
.content__title .gold { color: var(--accent); }

.content__description {
  font-family: var(--font-body);
  font-size: 16rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520rem;
  margin: 0 0 36rem;
}

.content__button {
  display: inline-flex;
  align-items: center;
  gap: 12rem;
  padding: 18rem 32rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #0a0a0a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  pointer-events: all;        /* override the .content lock */
  transition: box-shadow 0.4s var(--ease-out-quart),
              transform 0.4s var(--ease-out-quart),
              background 0.4s var(--ease-out-quart);
}
.content__button:hover {
  background: var(--accent-soft);
  box-shadow: 0 12rem 40rem var(--accent-glow);
  transform: translateY(-3rem);
}
.content__button svg {
  width: 18rem; height: 18rem;
  fill: none;
  stroke: #0a0a0a;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease-out-quart);
}
.content__button:hover svg { transform: translateX(6rem); }

/* ---------------- Gallery grid ---------------- */
.gallery {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 736rem;
  z-index: 1;
  will-change: transform;
}

.gallery__grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32rem;
  row-gap: 40rem;
  will-change: transform;
}

.gallery__item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--r-md);
  /* Visible even without images — dark gradient so the animation is
     perceptible before external images finish loading. */
  background: linear-gradient(135deg, #1c1c1e 0%, #111113 100%);
  box-shadow: 0 10rem 40rem rgba(0, 0, 0, 0.4),
              0 0 0 1rem rgba(245, 185, 33, 0.08);
}

/* Subtle gold tint at the bottom of each tile so the grid reads
   cohesive even when the source photos vary in tone. */
.gallery__item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(245,185,33,0) 60%, rgba(245,185,33,0.12) 100%);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

/* GPU compositing hints.
   .block__wrapper is intentionally excluded here: it already has
   will-change:transform, and applying an actual CSS transform to a
   position:sticky element breaks sticking in several Chrome/Edge builds.
   .gallery is excluded because it carries the centering translate3d. */
.gallery__grid { transform: translateZ(0); }
