/*
 * The Broadsheet — Hero Section Styles
 * hero-section.css  (loaded on front page)
 *
 * Supports 5 layout variants:
 *   overlay   — full-width image, text overlaid with gradient
 *   fullscreen — 100vh cinematic with centered content
 *   split     — 50/50 image | text side by side
 *   grid      — 1 large + 2 stacked (magazine grid)
 *   slider    — auto-advancing carousel
 */

/* ═══════════════════════════════════════════
   HERO TOKENS  (overridden by admin CSS vars)
═══════════════════════════════════════════ */
:root {
  --hero-height:          520px;
  --hero-overlay-color:   rgba(0,0,0,0.65);
  --hero-overlay-stop:    60%;
  --hero-title-color:     #ffffff;
  --hero-title-size:      clamp(28px,4vw,52px);
  --hero-title-weight:    700;
  --hero-title-font:      var(--font-display, 'Playfair Display', Georgia, serif);
  --hero-title-lh:        1.15;
  --hero-excerpt-color:   rgba(255,255,255,0.85);
  --hero-excerpt-size:    18px;
  --hero-meta-color:      rgba(255,255,255,0.65);
  --hero-tag-bg:          var(--crimson, #c9163a);
  --hero-tag-color:       #ffffff;
  --hero-tag-font-size:   10px;
  --hero-cta-bg:          var(--crimson, #c9163a);
  --hero-cta-color:       #ffffff;
  --hero-cta-hover-bg:    rgba(255,255,255,0.15);
  --hero-accent-bar:      var(--crimson, #c9163a);
  --hero-fallback-bg:     var(--ink, #0d0d0d);
  --hero-secondary-h:     var(--crimson, #c9163a);
  --hero-ui-speed:        0.32s;
}

/* ═══════════════════════════════════════════
   SHARED BASE
═══════════════════════════════════════════ */
.hero-section-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-section-wrap *,
.hero-section-wrap *::before,
.hero-section-wrap *::after {
  box-sizing: border-box;
}

/* Shared image fill */
.hs-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s var(--hero-ui-speed);
  will-change: transform;
}

.hs-img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--hero-fallback-bg);
}

.hero-section-wrap a:hover .hs-img { transform: scale(1.04); }

/* Shared gradient overlay */
.hs-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--hero-overlay-color) 0%,
    rgba(0,0,0,0.2) var(--hero-overlay-stop),
    transparent 100%
  );
  pointer-events: none;
}

/* Shared content block */
.hs-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* Category tag */
.hs-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hero-tag-bg);
  color: var(--hero-tag-color);
  font-family: var(--font-ui, 'Outfit', sans-serif);
  font-size: var(--hero-tag-font-size);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  text-decoration: none;
  align-self: flex-start;
  transition: background var(--hero-ui-speed), opacity var(--hero-ui-speed);
  border-radius: 1px;
  margin-bottom: 12px;
}

.hs-tag:hover { opacity: 0.85; }

/* Accent bar above title */
.hs-accent-bar {
  width: 36px;
  height: 3px;
  background: var(--hero-accent-bar);
  margin-bottom: 14px;
  display: block;
  flex-shrink: 0;
}

/* Titles */
.hs-title {
  font-family: var(--hero-title-font);
  font-size: var(--hero-title-size);
  font-weight: var(--hero-title-weight);
  line-height: var(--hero-title-lh);
  letter-spacing: -0.02em;
  color: var(--hero-title-color);
  margin: 0 0 12px;
  text-decoration: none;
  display: block;
  transition: opacity var(--hero-ui-speed);
}

.hs-title:hover { opacity: 0.88; }

/* Excerpt */
.hs-excerpt {
  font-family: var(--font-body, Georgia, serif);
  font-size: var(--hero-excerpt-size);
  line-height: 1.6;
  color: var(--hero-excerpt-color);
  margin: 0 0 16px;
  font-style: italic;
}

/* Meta */
.hs-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui, 'Outfit', sans-serif);
  font-size: 12px;
  color: var(--hero-meta-color);
  flex-wrap: wrap;
}

.hs-meta-author { font-weight: 600; }
.hs-meta-sep    { opacity: 0.4; }

/* CTA Button */
.hs-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hero-cta-bg);
  color: var(--hero-cta-color);
  font-family: var(--font-ui, 'Outfit', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 2px;
  margin-top: 8px;
  align-self: flex-start;
  transition: background var(--hero-ui-speed), transform 0.15s;
  border: 1px solid rgba(255,255,255,0.2);
}

.hs-cta:hover {
  background: var(--hero-cta-hover-bg);
  transform: translateY(-1px);
}

.hs-cta-arrow { transition: transform 0.2s; }
.hs-cta:hover .hs-cta-arrow { transform: translateX(3px); }


/* ═══════════════════════════════════════════
   LAYOUT 1 — OVERLAY
   Full-width image with text overlaid
═══════════════════════════════════════════ */
.hs-overlay-layout {
  height: var(--hero-height);
  position: relative;
}

.hs-overlay-layout .hs-img-wrap { border-radius: 0; }

.hs-overlay-layout .hs-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px);
  justify-content: flex-end;
}

.hs-overlay-layout .hs-title {
  font-size: clamp(26px, 3.8vw, 52px);
}


/* ═══════════════════════════════════════════
   LAYOUT 2 — FULLSCREEN
   100vh cinematic, content centered
═══════════════════════════════════════════ */
.hs-fullscreen-layout {
  height: 100vh;
  min-height: 600px;
  max-height: 1100px;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.hs-fullscreen-layout .hs-overlay {
  background: linear-gradient(
    to top,
    var(--hero-overlay-color) 0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.15) 100%
  );
}

.hs-fullscreen-layout .hs-content {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(40px,6vw,80px) clamp(24px,4vw,48px);
}

.hs-fullscreen-layout .hs-title {
  font-size: clamp(36px, 5.5vw, 72px);
}

.hs-fullscreen-layout .hs-excerpt {
  font-size: clamp(16px, 1.6vw, 20px);
  max-width: 600px;
}

/* Scroll indicator */
.hs-scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.7;
}

.hs-scroll-indicator span {
  font-family: var(--font-ui, sans-serif);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}

.hs-scroll-mouse {
  width: 20px;
  height: 30px;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  position: relative;
}

.hs-scroll-mouse::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 7px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  animation: hs-scroll 1.6s ease infinite;
}

@keyframes hs-scroll {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  80%  { opacity: 0; transform: translateX(-50%) translateY(8px); }
  100% { opacity: 0; transform: translateX(-50%) translateY(0); }
}


/* ═══════════════════════════════════════════
   LAYOUT 3 — SPLIT
   50/50 image left | text right
═══════════════════════════════════════════ */
.hs-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: var(--hero-height);
}

.hs-split-img-side {
  position: relative;
  overflow: hidden;
  background: var(--hero-fallback-bg);
}

.hs-split-img-side .hs-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hs-split-layout:hover .hs-split-img-side .hs-img { transform: scale(1.04); }

.hs-split-text-side {
  background: var(--hero-fallback-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 56px);
  position: relative;
}

/* Accent left border */
.hs-split-text-side::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--hero-accent-bar);
}

.hs-split-layout .hs-tag {
  align-self: flex-start;
}

.hs-split-layout .hs-title {
  font-size: clamp(22px, 2.8vw, 40px);
  color: var(--hero-title-color);
}

.hs-split-layout .hs-excerpt {
  color: var(--hero-excerpt-color);
}

.hs-split-layout .hs-meta {
  color: var(--hero-meta-color);
}

/* "Dark" text side when bg is light */
.hs-split-text-side.hs-text-light .hs-title   { color: var(--ink, #0d0d0d); }
.hs-split-text-side.hs-text-light .hs-excerpt  { color: var(--charcoal, #2c2c2c); font-style: normal; }
.hs-split-text-side.hs-text-light .hs-meta     { color: var(--mid, #6b6b6b); }
.hs-split-text-side.hs-text-light .hs-cta      { background: var(--hero-cta-bg); }


/* ═══════════════════════════════════════════
   LAYOUT 4 — MAGAZINE GRID
   Large story (left 60%) + 2 stacked (right 40%)
═══════════════════════════════════════════ */
.hs-grid-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  height: var(--hero-height);
  background: var(--ink, #0d0d0d);
}

/* Primary (spans both rows) */
.hs-grid-primary {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
}

.hs-grid-primary .hs-img-wrap { position: absolute; inset: 0; }

.hs-grid-primary .hs-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.hs-grid-primary .hs-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px;
}

.hs-grid-primary .hs-title {
  font-size: clamp(20px, 2.4vw, 34px);
}

/* Secondary cards */
.hs-grid-secondary {
  position: relative;
  overflow: hidden;
}

.hs-grid-secondary .hs-img-wrap { position: absolute; inset: 0; }

.hs-grid-secondary .hs-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}

.hs-grid-secondary .hs-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
}

.hs-grid-secondary .hs-tag {
  font-size: 9px;
  padding: 3px 8px;
  margin-bottom: 6px;
}

.hs-grid-secondary .hs-title {
  font-size: clamp(14px, 1.5vw, 18px);
  margin-bottom: 0;
  color: #fff;
}

.hs-grid-secondary .hs-meta { display: none; }


/* ═══════════════════════════════════════════
   LAYOUT 5 — SLIDER / CAROUSEL
   Auto-advancing with pagination dots
═══════════════════════════════════════════ */
.hs-slider-layout {
  position: relative;
  height: var(--hero-height);
  overflow: hidden;
}

.hs-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.77,0,0.175,1);
  will-change: transform;
}

.hs-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.hs-slide .hs-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: clamp(24px,4vw,52px);
}

.hs-slide .hs-title { font-size: clamp(24px, 3.5vw, 48px); }

/* Pagination dots */
.hs-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}

.hs-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.hs-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Prev / Next arrows */
.hs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
  line-height: 1;
}

.hs-arrow:hover { background: rgba(0,0,0,0.6); transform: translateY(-50%) scale(1.08); }
.hs-arrow-prev  { left: 16px; }
.hs-arrow-next  { right: 16px; }

/* Progress bar */
.hs-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: var(--hero-accent-bar);
  z-index: 10;
  transition: none;
}

.hs-progress.animating {
  transition: width linear;
}


/* ═══════════════════════════════════════════
   BELOW-HERO STRIP
   Featured row immediately below hero
═══════════════════════════════════════════ */
.hero-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--rule, #e0ddd7);
  margin-bottom: 36px;
  background: var(--paper, #f7f3ec);
}

.hero-strip-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-right: 1px solid var(--rule, #e0ddd7);
  text-decoration: none;
  transition: background 0.18s;
  position: relative;
}

.hero-strip-item:last-child { border-right: none; }
.hero-strip-item:hover      { background: rgba(0,0,0,0.02); }

.hero-strip-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--hero-accent-bar);
  opacity: 0;
  transition: opacity 0.18s;
}

.hero-strip-item:hover::before { opacity: 1; }

.hero-strip-rank {
  font-family: var(--font-display, Georgia, serif);
  font-size: 28px;
  font-weight: 900;
  color: var(--rule, #e0ddd7);
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
}

.hero-strip-thumb {
  width: 64px;
  height: 50px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.hero-strip-body {}

.hero-strip-cat {
  font-family: var(--font-ui, sans-serif);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hero-accent-bar);
  display: block;
  margin-bottom: 3px;
}

.hero-strip-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink, #0d0d0d);
  transition: color 0.15s;
}

.hero-strip-item:hover .hero-strip-title { color: var(--hero-accent-bar); }


/* ═══════════════════════════════════════════
   LIVE PREVIEW BADGE
═══════════════════════════════════════════ */
.hs-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e10600;
  color: #fff;
  font-family: var(--font-ui, sans-serif);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  margin-right: 8px;
}

.hs-live-badge::before {
  content: '●';
  font-size: 6px;
  animation: hs-blink 1.2s infinite;
}

@keyframes hs-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}


/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .hs-split-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 320px auto;
  }

  .hs-split-text-side::before { display: none; }

  .hs-grid-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 280px 160px 160px;
    height: auto;
  }

  .hs-grid-primary { grid-row: auto; }

  .hs-fullscreen-layout { height: 70vh; min-height: 480px; }

  .hero-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  :root { --hero-height: 380px; }

  .hs-arrow { display: none; }

  .hs-fullscreen-layout { height: 90vh; }

  .hero-strip { grid-template-columns: 1fr; }
  .hero-strip-item { border-right: none; border-bottom: 1px solid var(--rule); }
  .hero-strip-item:last-child { border-bottom: none; }

  .hs-split-layout { grid-template-rows: 240px auto; }
  .hs-split-text-side { padding: 24px 20px; }
}
