/* ---------- Hero ---------- */

.work-hero {
  padding: 60px 0 80px;
}

.hero-content { max-width: 800px; }

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(40, 215, 255, 0.08);
  border: 1px solid rgba(40, 215, 255, 0.15);
  border-radius: 8px;
  padding: 5px 14px;
  margin-bottom: 24px;
}

.work-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--soft);
  line-height: 1.8;
  max-width: 640px;
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-channels {
  margin-top: 28px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.channel-logo {
  height: 40px;
  width: auto;
  opacity: 0.7;
  filter: brightness(1.2);
  transition: opacity 0.2s;
}

.channel-logo:hover { opacity: 1; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 48px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-value {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 500;
}

/* ---------- Story ---------- */

.story {
  padding: 60px 0 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.story-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.story-narrative h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}

.story-narrative p {
  color: var(--soft);
  margin: 0 0 18px;
  line-height: 1.85;
}

.story-narrative strong { color: var(--text); font-weight: 600; }

.story-proof {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
}

.proof-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 0.3s;
}

.proof-card:hover { border-color: rgba(255, 255, 255, 0.12); }

.proof-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(40, 215, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.proof-text {
  font-size: 0.9rem;
  color: var(--soft);
  font-weight: 500;
  line-height: 1.5;
  padding-top: 6px;
}

/* ---------- Timeline ---------- */

.timeline-section {
  padding: 60px 0 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section-header {
  margin-bottom: 36px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.section-header p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.timeline-chart {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  overflow-x: auto;
}

.timeline-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.preston { background: var(--accent); }
.legend-dot.bri { background: var(--accent-2); }

#timeline-container {
  min-height: 360px;
}

#timeline-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.timeline-bar {
  transition: opacity 0.2s;
}

.timeline-bar:hover { opacity: 0.8; }

.timeline-bar-preston { fill: var(--accent); }
.timeline-bar-bri { fill: var(--accent-2); }

.timeline-label {
  fill: var(--muted);
  font-size: 12px;
  font-family: Inter, sans-serif;
  font-weight: 500;
}

.timeline-count {
  fill: var(--soft);
  font-size: 11px;
  font-family: Inter, sans-serif;
  font-weight: 600;
}

.timeline-gridline {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

/* ---------- Top Performers ---------- */

.top-section {
  padding: 60px 0 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.top-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 20px;
}

.top-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.top-card:hover .top-card-title {
  color: var(--text);
}

.top-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.top-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.top-card:hover .top-card-thumb img { transform: scale(1.03); }

.top-card-views {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  background: rgba(0, 0, 0, 0.8);
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.01em;
}

.top-card-info {
  padding: 10px 2px 6px;
}

.top-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--soft);
  transition: color 0.2s;
}

.top-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.top-card-separator {
  color: var(--muted);
  opacity: 0.5;
}

.top-card-channel {
  font-weight: 500;
}

.top-card-channel.preston {
  color: var(--accent);
}

.top-card-channel.bri {
  color: var(--accent-2);
}

/* ---------- Viral Hit Breakdown ---------- */

.breakdown-section {
  padding: 60px 0 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.breakdown-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 36px;
}

.breakdown-thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.breakdown-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.breakdown-thumb:hover img { transform: scale(1.03); }

.breakdown-info h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.25;
}

.breakdown-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.breakdown-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(40, 215, 255, 0.08);
  border: 1px solid rgba(40, 215, 255, 0.15);
  border-radius: 8px;
  padding: 4px 12px;
}

.breakdown-info p {
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.8;
  margin: 0;
}

.breakdown-pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.pipeline-stage {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 22px 18px;
  transition: border-color 0.3s;
}

.pipeline-stage:hover { border-color: rgba(255, 255, 255, 0.12); }

.pipeline-num {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.pipeline-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pipeline-stage p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0;
}

.breakdown-footnote {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
}

.breakdown-footnote p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}

.breakdown-footnote strong {
  color: var(--soft);
  font-weight: 600;
}

/* ---------- Catalog ---------- */

.catalog-section {
  padding: 60px 0 100px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.catalog-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-tab {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--soft);
}

.filter-tab.active {
  background: rgba(40, 215, 255, 0.1);
  border-color: rgba(40, 215, 255, 0.25);
  color: var(--accent);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 14px;
}

.catalog-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.catalog-card:hover .catalog-card-title {
  color: var(--text);
}

.catalog-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.catalog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.catalog-card:hover .catalog-card-thumb img { transform: scale(1.03); }

.catalog-card-views {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 5px;
  border-radius: 3px;
}

.catalog-card-info {
  padding: 8px 2px 6px;
}

.catalog-card-title {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--soft);
  transition: color 0.2s;
}

.catalog-card-channel {
  font-size: 0.66rem;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
}

/* Lazy load placeholder */
.catalog-card-thumb img[data-src] {
  opacity: 0;
  transition: opacity 0.3s;
}

.catalog-card-thumb img.loaded {
  opacity: 1;
}

/* ---------- Pagination ---------- */

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
  padding: 8px 0;
}

.page-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn:hover:not(.disabled):not(.active) {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.page-btn.active {
  background: rgba(40, 215, 255, 0.12);
  border-color: rgba(40, 215, 255, 0.3);
  color: var(--accent);
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: default;
}

.page-prev,
.page-next {
  font-size: 1.1rem;
}

.page-ellipsis {
  font-size: 0.82rem;
  color: var(--muted);
  opacity: 0.5;
  padding: 0 4px;
  user-select: none;
}

/* ---------- CTA ---------- */

.cta-section {
  padding: 40px 0 80px;
}

.cta-block {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 56px 48px;
  text-align: center;
}

.cta-block h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.cta-block p {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .breakdown-pipeline { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .work-hero { padding: 40px 0 60px; }

  .work-hero h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hero-stats .stat-card:last-child {
    grid-column: 1 / -1;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .top-grid { grid-template-columns: 1fr; }

  .breakdown-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .breakdown-pipeline { grid-template-columns: repeat(2, 1fr); }

  .catalog-grid { grid-template-columns: repeat(2, 1fr); }

  .cta-block { padding: 40px 24px; }

  .cta-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .breakdown-pipeline { grid-template-columns: 1fr; }
  .catalog-card-info { padding: 6px 2px 6px; }
  .catalog-card-title { font-size: 0.7rem; }
}
