/* ============================================================
   OTHER-WORKS.CSS — Graphic, architecture, experimental and art
   Filterable masonry gallery. Tiles are <figure class="ow-tile">.
   ============================================================ */

.ow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 100px;
}

.ow__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}

.ow__intro {
  max-width: 420px;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ── Filter tabs ── */
.ow__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.ow__filter {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: color 200ms ease-in-out, border-color 200ms ease-in-out, background 200ms ease-in-out;
}

.ow__filter:hover { color: var(--color-text-primary); border-color: rgba(255, 255, 255, 0.25); }

.ow__filter.is-active {
  color: #111;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ── Horizontal scroller ── */
.ow__scroller { position: relative; }

.ow__grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  -webkit-overflow-scrolling: touch;
}

.ow-tile {
  position: relative;
  display: block;
  flex: 0 0 min(360px, 78%);
  aspect-ratio: 9 / 6;
  margin: 0;
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.ow-tile[hidden] { display: none; }

.ow-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease-in-out;
}

.ow-tile:hover img { transform: scale(1.04); }

.ow-tile__cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 250ms ease-in-out, transform 250ms ease-in-out;
}

.ow-tile:hover .ow-tile__cap,
.ow-tile:focus-visible .ow-tile__cap,
.ow-tile:focus-within .ow-tile__cap { opacity: 1; transform: none; }

.ow-tile__cat { display: none; }

.ow-tile__cat {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.ow-tile__title {
  font-size: var(--text-xs);
  line-height: 1.3;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  color: #fff;
}

/* ── Arrows ── */
.ow__nav { display: flex; gap: 8px; margin-top: 20px; }

.ow__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-primary);
  font-size: 18px;
  cursor: pointer;
  transition: background 200ms ease-in-out, color 200ms ease-in-out, border-color 200ms ease-in-out;
}

.ow__arrow:hover { background: var(--color-accent); color: #111; border-color: var(--color-accent); }

/* Touch screens have no hover, so keep captions visible */
@media (hover: none) {
  .ow-tile__cap { opacity: 1; transform: none; }
}

@media (max-width: 1024px) {
  .ow { padding: 24px 32px 80px; }
}

@media (max-width: 720px) {
  .ow { padding: 16px 16px 56px; }
  .ow__nav { display: none; }
  .ow__header { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .ow-tile img, .ow-tile__cap, .ow__filter { transition: none; }
  .ow-tile:hover img { transform: none; }
}
