/* gallery-1 — 5×3 organic tile mosaic (clip-path on .flow-shape__bg) */

.gallery-1 {
  background: var(--color-bg, #fff);
  padding: 1.25rem var(--page-gutter) 3.5rem;
}

.gallery-1__inner {
  max-width: var(--page-max);
  margin: 0 auto;
}

.gallery-1__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.gallery-1__tile {
  aspect-ratio: 1;
  min-width: 0;
}

/* Photo / color fill lives on .flow-shape__bg — clip-path from data-clip (clip-paths.css) */
.gallery-1__tile > .flow-shape__bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.gallery-1__tile--color .flow-shape__bg {
  background-color: var(--gallery-tile-c, var(--color-blue));
}

.gallery-1__tile--color[data-c="blue"] {
  --gallery-tile-c: var(--color-blue);
}

.gallery-1__tile--color[data-c="orange"] {
  --gallery-tile-c: var(--color-orange);
}

.gallery-1__tile--color[data-c="green"] {
  --gallery-tile-c: var(--color-green);
}

.gallery-1__tile--color[data-c="yellow"] {
  --gallery-tile-c: var(--color-yellow);
}

.gallery-1__tile--color[data-c="pink"] {
  --gallery-tile-c: var(--color-pink);
}

.gallery-1__tile--color[data-c="purple"] {
  --gallery-tile-c: var(--color-purple);
}

.gallery-1__tile--color[data-c="red"] {
  --gallery-tile-c: var(--color-red);
}

.gallery-1__tile--color[data-c="navy"] {
  --gallery-tile-c: var(--color-navy);
}

/* Center CTA — two lines, same organic clip as other 1×1 tiles */
.gallery-1__tile--more {
  position: relative;
  display: block;
  color: #0a1f5c;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.2vw, 1.28rem);
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.gallery-1__tile--more .flow-shape__bg {
  background-color: #eef2f6;
  clip-path: url("#shape-1x1-1");
  -webkit-clip-path: url("#shape-1x1-1");
}

.gallery-1__tile--more .flow-shape__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  text-align: center;
  pointer-events: none;
}

.gallery-1__more-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

html[data-mode="block"] .gallery-1__more-link,
html[data-mode="edit"][data-altkey="1"] .gallery-1__more-link {
  display: none;
}

.gallery-1__more-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.gallery-1__more-line {
  display: block;
  text-align: center;
}

.gallery-1__more-line--marked {
  position: relative;
  padding-bottom: 0.38em;
}

/* Same yellow marker stroke as header nav */
.gallery-1__more-line--marked::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 108%;
  bottom: 0;
  height: 0.3em;
  min-height: 8px;
  background: url("/images/elements/nav-underline.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

@container page (max-width: 767px) {
  .gallery-1 {
    padding: 1rem var(--page-gutter) 2.25rem;
  }

  .gallery-1__tile--more {
    font-size: clamp(0.92rem, 4.2cqi, 1.12rem);
  }
}

@container page (min-width: 768px) {
  .gallery-1__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .gallery-1__tile--more {
    font-size: clamp(1.02rem, 2.4cqi, 1.18rem);
  }
}

/* Desktop: exactly 5 × 3 */
@container page (min-width: 900px) {
  .gallery-1 {
    padding: 1.5rem var(--page-gutter) 4.5rem;
  }

  .gallery-1__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .gallery-1__tile--more {
    font-size: clamp(1.08rem, 1.6cqi, 1.22rem);
  }
}
