/* =========================================================
   Feature Wall Edition — edition-feature-wall.css
   CSS column-count masonry layout with editorial feature cards
   ========================================================= */

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: #0a0a0f;
  color: #e8e8e8;
  font-family: 'Georgia', 'Times New Roman', serif;
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Page header ── */
.fw-header {
  padding: 3rem 2rem 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #0f0f18 0%, #0a0a0f 100%);
}

.fw-header__kicker {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.5rem;
}

.fw-header__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.fw-header__title span {
  color: rgba(255, 255, 255, 0.25);
}

.fw-header__sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}

/* ── Loading / Error states ── */
.fw-loading,
.fw-error {
  text-align: center;
  padding: 4rem 2rem;
  font-family: system-ui, -apple-system, sans-serif;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.fw-error {
  color: rgba(255, 100, 100, 0.7);
}

/* ── Wall container ── */
.fw-wall {
  column-count: 4;
  column-gap: 1rem;
  padding: 1.5rem;
  max-width: 1800px;
  margin: 0 auto;
}

/* ── Card ── */
.fw-card {
  break-inside: avoid;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0; /* GSAP will animate this in */

  /* Left border accent — primary_color set inline */
  border-left: 6px solid transparent;

  /* Prevents card from being split across columns */
  page-break-inside: avoid;
}

/* Height tiers */
.fw-card--short {
  min-height: 280px;
}

.fw-card--medium {
  min-height: 360px;
}

.fw-card--tall {
  min-height: 480px;
}

/* ── Background image ── */
.fw-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* Slight desaturation for editorial feel */
  filter: saturate(0.85) brightness(0.9);
  transition: filter 0.3s ease;
}

.fw-card__bg-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* ── Gradient overlay ── */
.fw-card__overlay {
  position: absolute;
  inset: 0;
  /* bg_color at 85% bottom to transparent top — set via inline style */
  pointer-events: none;
}

/* ── Badges ── */
.fw-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.fw-badge {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  line-height: 1.4;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.fw-badge--category {
  color: #fff;
}

.fw-badge--category[data-cat="franchise"] {
  background: rgba(37, 99, 235, 0.85);
}

.fw-badge--category[data-cat="studio"] {
  background: rgba(71, 85, 105, 0.85);
}

.fw-badge--category[data-cat="composer"] {
  background: rgba(225, 29, 72, 0.75);
}

.fw-badge--year {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Content area ── */
.fw-card__content {
  position: relative;
  z-index: 2;
  padding: 1rem 1rem 0.875rem;
}

.fw-card__name {
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.25rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.fw-card--short  .fw-card__name { font-size: 1.1rem; }
.fw-card--medium .fw-card__name { font-size: 1.25rem; }
.fw-card--tall   .fw-card__name { font-size: 1.5rem; }

.fw-card__tagline {
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Thin colour rule */
.fw-card__rule {
  width: 40px;
  height: 2px;
  margin-bottom: 0.5rem;
  border: none;
  /* primary_color set inline */
}

/* Pull-quote callout */
.fw-card__pullquote {
  font-style: italic;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.65);
  padding-left: 0.75rem;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

/* ── Key works (tall cards only) ── */
.fw-card__works {
  margin-bottom: 0.6rem;
}

.fw-card__works-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
  list-style: none;
}

.fw-card__works-list li {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  justify-content: space-between;
  gap: 4px;
  overflow: hidden;
}

.fw-card__works-list .work-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.fw-card__works-list .work-year {
  flex-shrink: 0;
  opacity: 0.6;
}

/* ── Page links ── */
.fw-card__pages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fw-card__pages li {
  display: flex;
  align-items: center;
}

.fw-card__pages li::before {
  content: '›';
  font-family: system-ui, sans-serif;
  margin-right: 4px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.fw-card__pages a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.fw-card__pages a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Hidden 5th page link ── */
.fw-card__page--hidden {
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  transition: none; /* GSAP handles this */
}

/* ── Hover state (non-GSAP fallback) ── */
.fw-card:hover .fw-card__bg {
  filter: saturate(1.1) brightness(0.95);
}

.fw-card:hover .fw-badge--category {
  /* JS handles scale via GSAP */
}

/* ── Footer ── */
.fw-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 1rem;
}

.fw-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.fw-footer__links a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.fw-footer__links a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Responsive breakpoints ── */
@media (max-width: 1200px) {
  .fw-wall {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .fw-wall {
    column-count: 2;
    padding: 1rem;
    column-gap: 0.75rem;
  }

  .fw-card--short  { min-height: 240px; }
  .fw-card--medium { min-height: 300px; }
  .fw-card--tall   { min-height: 380px; }
}

@media (max-width: 480px) {
  .fw-wall {
    column-count: 1;
    padding: 0.75rem;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .fw-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .fw-card__bg {
    transition: none !important;
  }

  /* Always show 5th page link */
  .fw-card__page--hidden {
    opacity: 1 !important;
    max-height: none !important;
    margin-top: 2px !important;
  }

  .fw-badge {
    transition: none !important;
  }
}
