/* ============================================================
   playground.css  ·  page-specific styles for playground.html
   ------------------------------------------------------------
   Same two-column structure as photo-gallery and friends: a sticky
   sidebar (intro + filters) and a masonry grid of mixed sizes and
   aspect ratios. Link after tokens.css, site.css, base.css.
   ============================================================ */

:root {
  --color-chip-bg:         rgba(35, 39, 66, 0.04);
  --color-chip-active:     #232742;
  --color-chip-active-txt: #fcfcfc;
  --color-bg-frame:        #ffffff;
  --shadow-tile:           0 2px 8px rgba(35, 39, 66, 0.08);
  --shadow-tile-hover:     0 14px 36px rgba(35, 39, 66, 0.18);
}
[data-theme="dark"] {
  --color-chip-bg:         rgba(252, 252, 252, 0.05);
  --color-chip-active:     #fcfcfc;
  --color-chip-active-txt: #14172A;
  --color-bg-frame:        #1B1F38;
  --shadow-tile:           0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-tile-hover:     0 16px 40px rgba(0, 0, 0, 0.55);
}

/* LAYOUT */
.play-layout { display: grid; grid-template-columns: 248px 1fr; align-items: start; }

.play-sidebar {
  position: sticky;
  top: 60px;
  align-self: start;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 56px 28px 40px 48px;
  border-right: 0.5px solid var(--color-border-hairline);
  display: flex;
  flex-direction: column;
}

.play-main { padding: 56px 48px 100px; min-width: 0; }

/* INTRO */
.play-eyebrow {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.play-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--color-text-primary);
  margin-bottom: 14px;
}
.play-title em { font-style: italic; white-space: nowrap; }
.play-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
  text-wrap: balance;
}

/* FILTERS (same pattern as the gallery sidebar) */
.play-filters { display: flex; flex-direction: column; gap: 1px; }
.play-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  border-radius: 7px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
@media (hover: hover) {
  .play-filter:hover { color: var(--color-text-primary); background: var(--color-bg-hover); }
}
.play-filter.active { color: var(--color-text-primary); background: var(--color-chip-bg); font-weight: 600; }
.play-filter .count { font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.play-filter.active .count { color: var(--color-text-secondary); }

/* MASONRY GRID: tiles keep their own aspect ratio, columns balance the rest */
.play-grid { column-count: 3; column-gap: 20px; }
@media (min-width: 1500px) { .play-grid { column-count: 4; } }

.tile {
  break-inside: avoid;
  margin: 0 0 20px;
  display: block;
  width: 100%;
}
.tile.is-hidden { display: none; }

.tile-media {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-bg-frame);
  box-shadow: var(--shadow-tile);
  transition: box-shadow 0.3s ease, transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tile:hover .tile-media { box-shadow: var(--shadow-tile-hover); transform: translateY(-4px); }
.tile-media img, .tile-media video { display: block; width: 100%; height: 100%; object-fit: cover; }

.tile-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 2px 0; }
.tile-title { font-size: 13px; font-weight: 600; color: var(--color-text-primary); }
.tile-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.play-empty { display: none; padding: 80px 2px; max-width: 400px; }
.play-empty.show { display: block; }
.play-empty-title { font-family: 'Instrument Serif', serif; font-size: 30px; line-height: 1.1; letter-spacing: 0.01em; color: var(--color-text-primary); margin-bottom: 12px; }
.play-empty-title em { font-style: italic; }
.play-empty p { font-size: 14px; line-height: 1.6; color: var(--color-text-secondary); text-wrap: balance; }

@media (prefers-reduced-motion: reduce) {
  .tile-media { transition: box-shadow 0.3s ease; }
  .tile:hover .tile-media { transform: none; }
}

/* FOOTER */
.site-footer {
  border-top: 0.5px solid var(--color-border-hairline);
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy { font-size: 13px; color: var(--color-text-muted); }
.footer-links { display: flex; align-items: center; gap: 20px; }
.footer-link { font-size: 13px; font-weight: 600; color: var(--color-text-muted); text-decoration: none; }
.footer-link:hover { color: var(--color-text-primary); }

/* Tablet: sidebar collapses to a chip row on top */
@media (max-width: 900px) {
  .site-nav { padding: 0 32px; }
  .play-layout { grid-template-columns: 1fr; }
  .play-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 0.5px solid var(--color-border-hairline);
    padding: 44px 32px 24px;
  }
  .play-sub { max-width: 540px; }
  .play-filters { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .play-filter { width: auto; background: var(--color-chip-bg); border-radius: 999px; padding: 8px 14px; gap: 7px; }
  .play-filter.active { background: var(--color-chip-active); color: var(--color-chip-active-txt); }
  .play-filter.active .count { color: var(--color-chip-active-txt); opacity: 0.7; }
  .play-main { padding: 28px 32px 72px; }
  .play-grid { column-count: 2; column-gap: 16px; }
  .tile { margin-bottom: 16px; }
}

/* Mobile */
@media (max-width: 640px) {
  .site-nav { padding: 0 20px; }
  .nav-link, .nav-divider { display: none; }
  .play-sidebar { padding: 32px 20px 20px; }
  .play-title { font-size: 26px; }
  .play-main { padding: 24px 20px 56px; }
  .play-grid { column-count: 1; }
  .site-footer { padding: 20px; }
}
