/* ==========================================================================
   Grafik Tasarım — page-scoped styles
   Only the pieces that are unique to this page live here. Everything else
   (.one-article, .one-definition__*, .one-breadcrumb, etc.) already comes
   from dmu-one-articles.css, loaded globally via main.css.

   All new rules are namespaced under .graphic-showcase so they cannot
   collide with any other page's CSS.
   ========================================================================== */

.graphic-showcase {
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.graphic-showcase__intro {
  max-width: 40rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  color: var(--article-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Asymmetric masonry-style grid: one large "hero" tile (our brand-guide
   work) anchoring four smaller tiles that fan out around it. */
.graphic-showcase__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, clamp(4.5rem, 9vw, 7.5rem));
  grid-template-areas:
    "hero hero logo  logo  print print"
    "hero hero logo  logo  print print"
    "hero hero social social shapes shapes"
    "hero hero social social shapes shapes";
  gap: clamp(.6rem, 1.4vw, 1rem);
}

.graphic-showcase__item {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--article-line);
  border-radius: var(--radius-lg);
  background: var(--article-bg);
  isolation: isolate;
}

.graphic-showcase__item--hero  { grid-area: hero; }
.graphic-showcase__item--logo  { grid-area: logo; }
.graphic-showcase__item--print { grid-area: print; }
.graphic-showcase__item--social{ grid-area: social; }
.graphic-showcase__item--shapes{ grid-area: shapes; }

.graphic-showcase__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(45%) contrast(1.02);
  transform: scale(1.02);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1),
              filter .45s ease;
}

.graphic-showcase__item:hover img,
.graphic-showcase__item:focus-visible img {
  filter: grayscale(0%) contrast(1.05);
  transform: scale(1.08) rotate(-.4deg);
}

/* Caption reveal: sits pinned to the bottom, slides fully into view and
   gains a scrim on hover/focus so the tag + label stay legible over any
   underlying image. */
.graphic-showcase__caption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.1rem 1.1rem .95rem;
  transform: translateY(calc(100% - 2.9rem));
  background: linear-gradient(0deg, rgba(17, 16, 14, .88) 0%, rgba(17, 16, 14, .55) 55%, rgba(17, 16, 14, 0) 100%);
  color: #fff;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}

.graphic-showcase__item:hover .graphic-showcase__caption,
.graphic-showcase__item:focus-visible .graphic-showcase__caption {
  transform: translateY(0);
}

.graphic-showcase__tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  height: 1.6rem;
  padding: 0 .65rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.graphic-showcase__caption strong {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.graphic-showcase__desc {
  color: rgba(255, 255, 255, .78);
  font-size: .82rem;
  line-height: 1.5;
}

/* The hero tile is a real link to the brand-identity deep dive — give it a
   visible affordance on top of the shared hover behaviour. */
.graphic-showcase__item--hero::after {
  content: "→";
  position: absolute;
  top: .9rem;
  right: .9rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--primary);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(-.4rem);
  transition: opacity .3s ease, transform .3s ease;
}

.graphic-showcase__item--hero:hover::after,
.graphic-showcase__item--hero:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

[data-theme="dark"] .graphic-showcase__item {
  background: var(--article-bg);
}

[data-theme="dark"] .graphic-showcase__item img {
  filter: grayscale(55%) brightness(.92) contrast(1.05);
}

[data-theme="dark"] .graphic-showcase__item:hover img,
[data-theme="dark"] .graphic-showcase__item:focus-visible img {
  filter: grayscale(0%) brightness(1) contrast(1.05);
}

@media (max-width: 760px) {
  .graphic-showcase__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-template-areas:
      "hero"
      "logo"
      "print"
      "social"
      "shapes";
  }

  .graphic-showcase__item {
    height: 13rem;
  }

  .graphic-showcase__item--hero {
    height: 16rem;
  }

  /* On touch devices hover never fires, so keep captions permanently
     legible instead of hiding content behind an interaction that can't
     happen. */
  .graphic-showcase__caption {
    transform: translateY(0);
    background: linear-gradient(0deg, rgba(17, 16, 14, .88) 0%, rgba(17, 16, 14, .2) 100%);
  }

  .graphic-showcase__item img {
    transform: scale(1.02);
  }
}

@media (max-width: 520px) {
  .graphic-showcase__item--hero {
    height: 14rem;
  }

  .graphic-showcase__item {
    height: 11.5rem;
  }
}
