/* ══════════════════════════════════════════════
   FUN PAGE
   Inherits all tokens from style.css
══════════════════════════════════════════════ */

/* ── Page wrapper ── */
.fun-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 110px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ── Header ── */
.fun-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  animation: funFadeUp 0.55s ease both;
}

.fun-header__eyebrow {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fun-header__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  animation: funFadeUp 0.55s ease both 0.08s;
}

.fun-header__sub {
  max-width: 520px;
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-ink-soft);
  line-height: 1.6;
  animation: funFadeUp 0.55s ease both 0.18s;
}

/* ── Grid ──
   Bento-style: 2 equal columns. A card can carry .fun-card--wide
   to span both columns (double the width of a single card). */
.fun-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  animation: funFadeUp 0.55s ease both 0.28s;
}

/* Reuses .work-card shell (border/radius/hover) — sized up so the
   video gets real presence instead of a thumbnail-sized crop. */
.fun-grid .work-card {
  width: 100%;
}

.fun-card--wide {
  grid-column: span 2;
}

/* ── Media (video) frame — replaces .work-card__img for video content ── */
.fun-card__media {
  width: 100%;
  height: 260px;
  background: var(--color-placeholder);
  overflow: hidden;
  flex-shrink: 0;
}

/* Wide card gets a taller frame too, so the extra width doesn't
   just letterbox the video thinner */
.fun-card--wide .fun-card__media {
  height: 340px;
}

.fun-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Description — sits between the subtitle and tags ── */
.fun-card__desc {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-ink-soft);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ── Responsive ──
   Three tiers, cascading by source order (each narrower block
   overrides the one above it for any shared property):
   desktop (default, >1024px) → tablet (≤1024px, still 2 columns,
   just tighter) → mobile (≤640px, collapses to 1 column). */

/* Tablet — keep the 2-column bento grid, just scale it down instead
   of dumping tablet widths into the mobile single-column layout. */
@media (max-width: 1024px) {
  .fun-page {
    max-width: 680px;
  }

  .fun-grid {
    gap: 24px;
  }

  .fun-card__media {
    height: 220px;
  }

  .fun-card--wide .fun-card__media {
    height: 280px;
  }
}

/* Mobile — collapse to 1 column, fluid full-width cards */
@media (max-width: 640px) {
  .fun-page {
    padding: 90px 16px 60px;
    gap: 40px;
    max-width: none;
  }

  .fun-header__title {
    font-size: 26px;
  }

  .fun-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .fun-card--wide {
    grid-column: auto;
  }

  .fun-card__media,
  .fun-card--wide .fun-card__media {
    height: 200px;
  }
}

/* ── Load animation ── */
@keyframes funFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}
