/**
 * Homepage v2.0 - Hero Bento Grid
 * @description CSS Grid bento layout for featured articles: 1 large + 2 side cards
 * @task Homepage Full Redesign
 * @version 1.0.0
 * @date 2026-02-16
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 1rem 0;
}

/* Mobile-first: hero is a horizontal scroll-snap carousel of 3 publications.
   Restored to a bento grid at 768px+ (see media queries below). */
.hero-grid {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.hero-grid::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   Hero Card
   ========================================================================== */

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.hero-card a {
  display: block;
  position: relative;
  height: 100%;
}

.hero-card-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-card:hover .hero-card-bg {
  transform: scale(1.03);
}

.hero-card:hover {
  box-shadow: 0 0 40px rgba(232, 197, 71, 0.08);
}

/* Gradient overlay */
.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}

/* ==========================================================================
   Hero Card Variants
   ========================================================================== */

/* Mobile: all three publications are equal vertical carousel slides,
   using the mobile cover (TV mobile_slider_image, 430x696 portrait). */
.hero-main .hero-card-bg,
.hero-side .hero-card-bg {
  aspect-ratio: 430 / 696;
}

/* ==========================================================================
   Carousel Dots (mobile only — injected by hero-carousel.js)
   ========================================================================== */

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 0.75rem;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all var(--transition-fast, 150ms);
}

.hero-dot.active {
  background: var(--color-brand-accent, #E8C547);
  width: 16px;
  border-radius: 3px;
}

/* ==========================================================================
   Hero Badge
   ========================================================================== */

.hero-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: var(--font-weight-black, 800);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  color: #fff;
  margin-bottom: 0.5rem;
  width: fit-content;
}

/* ==========================================================================
   Hero Title & Meta
   ========================================================================== */

.hero-title {
  font-family: var(--font-display);
  color: #fff;
  font-variation-settings: "opsz" 72;
  line-height: var(--line-height-tight, 1.1);
  letter-spacing: normal;
  font-weight: var(--font-weight-bold);
}

.hero-main .hero-title {
  font-size: var(--text-3xl);
}

.hero-side .hero-title {
  font-size: var(--text-2xl);
}

.hero-meta {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

/* ==========================================================================
   Hero Badges — solid category colors, positioned top-left
   ========================================================================== */

.hero-card .badge--category,
.hero-card .badge--category[data-category] {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  color: #fff;
  border-color: transparent;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  width: fit-content;
}
.hero-card .badge--category[data-category="artists"]   { background: var(--color-cat-artists); }
.hero-card .badge--category[data-category="interview"] { background: var(--color-cat-interview); }
.hero-card .badge--category[data-category="community"] { background: var(--color-cat-community); }
.hero-card .badge--category[data-category="models"]    { background: var(--color-cat-models); }
.hero-card .badge--category[data-category="trends"]    { background: var(--color-cat-trends); }
.hero-card .badge--category[data-category="knowledge"] { background: var(--color-cat-knowledge); }
.hero-card .badge--category[data-category="events"]    { background: var(--color-cat-events); }
.hero-card .badge--category[data-category="equipment"] { background: var(--color-cat-equipment); }

/* ==========================================================================
   Responsive — Tablet (768px+)
   ========================================================================== */

@media (min-width: 768px) {
  /* Restore bento grid — carousel is mobile-only */
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    scroll-snap-type: none;
  }

  .hero-card {
    flex: none;
    scroll-snap-align: none;
  }

  .hero-dots {
    display: none;
  }

  .hero-main .hero-card-bg {
    aspect-ratio: 2 / 1;
  }

  .hero-side .hero-card-bg {
    aspect-ratio: 16 / 9;
  }

  .hero-main .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-card-overlay {
    padding: 2rem;
  }

  .hero-card .badge--category {
    top: 12px;
    left: 12px;
  }
}

/* ==========================================================================
   Responsive — Desktop (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    min-height: 520px;
  }

  .hero-main {
    grid-row: 1 / 3;
  }

  .hero-main .hero-card-bg,
  .hero-side .hero-card-bg {
    aspect-ratio: auto;
    height: 100%;
  }

  .hero-main .hero-title {
    font-size: var(--text-4xl);
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .hero-card-bg {
    transition: none;
  }
}
