/**
 * YouTube Hero Section - Styles
 * Frontend and editor styles
 */

/* ═══════════════════════════════════════════
   FONTS
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=DM+Sans:wght@300;400;500&display=swap');

/* ═══════════════════════════════════════════
   CSS VARIABLES
═══════════════════════════════════════════ */
:root {
  --yt-hero-overlay-start: rgba(10, 8, 20, 0.72);
  --yt-hero-overlay-end: rgba(10, 8, 20, 0.25);
  --yt-hero-accent: #e8c87a;
  --yt-hero-accent-dim: rgba(232, 200, 122, 0.18);
  --yt-hero-white: #f5f3ee;
  --yt-hero-transition-slow: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  --yt-hero-transition-mid: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════
   HERO WRAPPER
═══════════════════════════════════════════ */
.yt-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   VIDEO BACKGROUND
═══════════════════════════════════════════ */
.yt-hero__video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a0814;
}

.yt-hero__iframe-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.yt-hero__iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.yt-hero__video-bg.is-loading .yt-hero__iframe-wrap {
  opacity: 0;
}

/* ═══════════════════════════════════════════
   GRADIENT OVERLAY
═══════════════════════════════════════════ */
.yt-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    var(--yt-hero-overlay-start) 0%,
    rgba(10,8,20,0.45) 50%,
    var(--yt-hero-overlay-end) 100%
  );
  box-shadow: inset 80px 0 120px rgba(10,8,20,0.6);
}

.yt-hero__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10,8,20,0.55) 100%);
}

/* ═══════════════════════════════════════════
   CONTENT
═══════════════════════════════════════════ */
.yt-hero__content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding: 0 40px;
  margin-right: auto;
  margin-left: clamp(40px, 8vw, 140px);
}

.yt-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yt-hero-accent);
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(14px);
  animation: ytHeroFadeUp 0.9s 0.3s var(--yt-hero-transition-slow) forwards;
}

.yt-hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--yt-hero-accent);
}

.yt-hero__headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--yt-hero-white);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(18px);
  animation: ytHeroFadeUp 1s 0.5s var(--yt-hero-transition-slow) forwards;
}

.yt-hero__headline em {
  font-style: italic;
  color: var(--yt-hero-accent);
}

.yt-hero__subhead {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(245,243,238,0.75);
  max-width: 480px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(14px);
  animation: ytHeroFadeUp 1s 0.7s var(--yt-hero-transition-slow) forwards;
}

.yt-hero__cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(12px);
  animation: ytHeroFadeUp 1s 0.9s var(--yt-hero-transition-slow) forwards;
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yt-hero-accent);
  color: #0a0814;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
}

.btn-primary:hover {
  background: #f0d896;
  transform: translateY(-2px);
}

.btn-primary svg {
  flex-shrink: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--yt-hero-white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border: 1px solid rgba(245,243,238,0.3);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s, transform 0.2s;
}

.btn-ghost:hover {
  border-color: var(--yt-hero-accent);
  color: var(--yt-hero-accent);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   VIDEO REEL STRIP
═══════════════════════════════════════════ */
.yt-hero__reel {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(40px, 8vw, 140px);
  opacity: 0;
  animation: ytHeroFadeUp 1s 1.2s ease forwards;
}

.yt-hero__reel-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,243,238,0.45);
  white-space: nowrap;
  margin-right: 8px;
}

.yt-hero__reel-videos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.yt-hero__reel-videos::-webkit-scrollbar {
  display: none;
}

.yt-reel-thumb {
  position: relative;
  width: 90px;
  height: 54px;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.25s, transform 0.25s;
}

.yt-reel-thumb.is-active {
  border-color: var(--yt-hero-accent);
}

.yt-reel-thumb:hover {
  transform: scale(1.06);
}

.yt-reel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.yt-reel-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10,8,20,0.35);
  transition: background 0.25s;
}

.yt-reel-thumb.is-active::after,
.yt-reel-thumb:hover::after {
  background: rgba(10,8,20,0.1);
}

.yt-reel-thumb__badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  z-index: 1;
  background: var(--yt-hero-accent);
  color: #0a0814;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 5px;
  display: none;
}

.yt-reel-thumb.has-moment .yt-reel-thumb__badge {
  display: block;
}

/* ═══════════════════════════════════════════
   NOW PLAYING INDICATOR
═══════════════════════════════════════════ */
.yt-hero__now-playing {
  position: absolute;
  top: 36px;
  right: 40px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: ytHeroFadeIn 1s 1.5s ease forwards;
}

.np-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.np-bars span {
  display: block;
  width: 3px;
  background: var(--yt-hero-accent);
  border-radius: 1px;
  animation: ytHeroBarBounce 1.2s ease-in-out infinite;
}

.np-bars span:nth-child(1) {
  height: 6px;
  animation-delay: 0s;
}

.np-bars span:nth-child(2) {
  height: 14px;
  animation-delay: 0.2s;
}

.np-bars span:nth-child(3) {
  height: 9px;
  animation-delay: 0.1s;
}

.np-bars span:nth-child(4) {
  height: 14px;
  animation-delay: 0.3s;
}

.np-bars span:nth-child(5) {
  height: 5px;
  animation-delay: 0.15s;
}

.np-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(245,243,238,0.55);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════
   MOMENT TOAST
═══════════════════════════════════════════ */
.yt-moment-toast {
  position: absolute;
  top: 80px;
  right: 40px;
  z-index: 4;
  background: var(--yt-hero-accent-dim);
  border: 1px solid var(--yt-hero-accent);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--yt-hero-accent);
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

.yt-moment-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.yt-moment-toast svg {
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes ytHeroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ytHeroFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes ytHeroBarBounce {
  0%, 100% {
    transform: scaleY(0.4);
  }
  50% {
    transform: scaleY(1);
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .yt-hero {
    min-height: 500px;
  }

  .yt-hero__content {
    margin-left: 28px;
    padding: 0 24px 0 0;
  }

  .yt-hero__reel {
    padding: 0 28px;
  }

  .yt-hero__now-playing {
    right: 20px;
  }

  .yt-moment-toast {
    right: 20px;
  }

  .yt-hero__reel-videos {
    gap: 7px;
  }

  .yt-reel-thumb {
    width: 70px;
    height: 42px;
  }

  .yt-hero__headline {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
}

@media (max-width: 480px) {
  .yt-hero__cta-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════
   EDITOR STYLES
═══════════════════════════════════════════ */
.yt-hero-block-editor {
  margin: 0;
}

.yt-hero-block-editor > div {
  border-radius: 2px;
  overflow: hidden;
}
