/* ==========================================================================
   Mashal — Gallery
   Pre-launch, the grid holds reserved frames (dashed, honest about being
   empty). Real photos replace tiles one by one — markup recipe is commented
   in gallery.html. `.g-tile--photo` styles below are ready and waiting.
   ========================================================================== */

.g-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* ---- Reserved frame (placeholder) ---------------------------------------- */
.g-tile {
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: var(--space-xs);
  aspect-ratio: 4 / 3;
  padding: var(--space-lg);
  border: 2px dashed rgba(26, 22, 80, 0.18);
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 14px,
    rgba(91, 63, 224, 0.025) 14px 28px
  );
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.g-tile:hover {
  border-color: rgba(91, 63, 224, 0.4);
  transform: translateY(-4px);
}
.g-tile__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  color: var(--brand-purple);
  opacity: 0.55;
  margin-bottom: var(--space-2xs);
}
.g-tile__icon svg { width: 100%; height: 100%; }
.g-tile__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text-ink);
}
.g-tile__note { font-size: var(--step--1); color: var(--text-muted); max-width: 24ch; }

/* ---- Real photo tile (used once photos exist) ----------------------------- */
.g-tile--photo {
  display: block;
  padding: 0;
  border: 1px solid rgba(26, 22, 80, 0.09);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.g-tile--photo:hover { box-shadow: var(--shadow-md); }
.g-tile--photo figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; }
.g-tile--photo img { width: 100%; height: 100%; object-fit: cover; }
.g-tile--photo figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--step--1);
  color: var(--text-body);
  background: var(--surface);
}

@media (max-width: 61.99em) { .g-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 35.99em) { .g-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .g-tile:hover { transform: none; }
}
