/* ══════════════════════════════════════════════════════════════════════════════
   Wolf IPTV — home-hero.css (M1.2)
   ──────────────────────────────────────────────────────────────────────────────
   الـ Hero section styles للـ home page الجديد.

   Structure:
     1. Hero container + background layers
     2. Floating keywords backdrop
     3. Hero content (eyebrow, title, subtitle, CTAs)
     4. Hero viz (TV + ripples + tags)
     5. Responsive @media queries
     6. Reduced-motion accessibility

   Design system tokens المستخدمة (كلهم من core/_variables.css):
     --brand, --brand-soft, --brand-deep, --success
     --surface, --surface-2, --border, --border-strong, --border-brand
     --text, --text-soft
     --shadow-md, --shadow-brand, --hero-mesh, --hero-grid
     --font-display, --font-body
     --sp-1..--sp-16, --container-max, --nav-h
     --r-xl, --r-pill

   Hero-specific tokens (defined hereunder):
     --kw-outline, --kw-solid, --kw-gold     (keyword colors)
     --viz-glow, --ripple-color              (viz glow)
     --tv-frame-1, --tv-frame-2, --tv-border,
     --tv-glow, --tv-screen-bg-1,
     --tv-screen-bg-2, --tv-iptv-stroke     (TV palette)

   @since 2026-06-05 (M1.2)
   ══════════════════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════════════════════
   Hero-specific tokens
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Floating keywords backdrop palette */
  --kw-outline: rgba(137, 96, 199, 0.10);
  --kw-solid:   rgba(167, 139, 219, 0.08);
  --kw-gold:    rgba(245, 182, 66, 0.12);

  /* Viz glow + ripples */
  --viz-glow:     rgba(137, 96, 199, 0.35);
  --ripple-color: rgba(137, 96, 199, 0.40);

  /* TV palette */
  --tv-frame-1:      #1A1A26;
  --tv-frame-2:      #0F0F1A;
  --tv-border:       rgba(137, 96, 199, 0.35);
  --tv-glow:         rgba(137, 96, 199, 0.25);
  --tv-screen-bg-1:  #2A1A4A;
  --tv-screen-bg-2:  #1A0F2E;
  --tv-iptv-stroke:  rgba(167, 139, 219, 0.55);
}


/* ══════════════════════════════════════════════════════════════════════════════
   1. HERO CONTAINER + BACKGROUND LAYERS
   ══════════════════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-h) + var(--sp-12)) 0 var(--sp-16);
  overflow: hidden;
  isolation: isolate;
}

/* Mesh background — gradient blobs */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: var(--hero-mesh);
  pointer-events: none;
}

/* Subtle grid pattern */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 20%, transparent 75%);
  pointer-events: none;
  opacity: 0.35;
}


/* ══════════════════════════════════════════════════════════════════════════════
   2. FLOATING KEYWORDS BACKDROP
   ══════════════════════════════════════════════════════════════════════════════ */

.hero__keywords {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  /* Fade out bottom 30% to blend into content */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
}

.kw {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  user-select: none;
  white-space: nowrap;
  will-change: transform;
}

/* Style variants */
.kw--outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--kw-outline);
}
.kw--solid { color: var(--kw-solid); }
.kw--gold  { color: var(--kw-gold); }

/* Size variants */
.kw--xxl { font-size: clamp(80px, 11vw, 180px); letter-spacing: -6px; }
.kw--xl  { font-size: clamp(56px, 7vw,  110px); letter-spacing: -4px; }
.kw--lg  { font-size: clamp(36px, 5vw,  68px);  letter-spacing: -2px; }
.kw--md  { font-size: clamp(24px, 3.2vw, 42px); letter-spacing: -1px; }
.kw--sm  { font-size: clamp(16px, 2vw,   24px); letter-spacing: 0; }

/* Position + animation per keyword (1-13) */
.kw--1  { top: 5%;   right: -2%;  animation: hero-float-a 8s   ease-in-out infinite; }
.kw--2  { top: 14%;  left: 4%;    animation: hero-float-b 9s   ease-in-out infinite -1s; }
.kw--3  { top: 30%;  right: 38%;  animation: hero-float-c 7s   ease-in-out infinite -2s; }
.kw--4  { top: 48%;  right: -5%;  animation: hero-float-b 10s  ease-in-out infinite -3s; }
.kw--5  { top: 62%;  left: -3%;   animation: hero-float-a 8s   ease-in-out infinite -4s; }
.kw--6  { top: 22%;  right: 12%;  animation: hero-float-c 9s   ease-in-out infinite -1.5s; }
.kw--7  { top: 76%;  right: 42%;  animation: hero-float-b 7s   ease-in-out infinite -2.5s; }
.kw--8  { top: 38%;  left: 14%;   animation: hero-float-a 8.5s ease-in-out infinite -3.5s; }
.kw--9  { top: 8%;   right: 28%;  animation: hero-float-c 9.5s ease-in-out infinite -0.5s; }
.kw--10 { top: 70%;  left: 22%;   animation: hero-float-b 8s   ease-in-out infinite -4.5s; }
.kw--11 { top: 54%;  left: 36%;   animation: hero-float-a 9s   ease-in-out infinite -2s; }
.kw--12 { top: 88%;  right: 10%;  animation: hero-float-c 8s   ease-in-out infinite -3s; }
.kw--13 { top: 18%;  left: 30%;   animation: hero-float-b 10s  ease-in-out infinite -5s; }

@keyframes hero-float-a {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes hero-float-b {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
@keyframes hero-float-c {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}


/* ══════════════════════════════════════════════════════════════════════════════
   3. HERO CONTENT (left column desktop / top mobile)
   ══════════════════════════════════════════════════════════════════════════════ */

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
  position: relative;
}

.hero__content { max-width: 600px; }

/* ── Eyebrow: badge + status text ── */

.hero__eyebrow {
  display: inline-flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-6);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(137, 96, 199, 0.10);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 800;
}

.hero__eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

/* Shine animation on badge */
.hero__eyebrow-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.20) 50%, transparent 70%);
  animation: hero-shine 4s ease-in-out infinite;
}
@keyframes hero-shine {
  0%, 100% { transform: translateX(-100%); }
  50%      { transform: translateX(100%); }
}

.hero__eyebrow-badge .icon {
  width: 12px;
  height: 12px;
}

.hero__eyebrow-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 12px;
  color: var(--text);
  white-space: nowrap;
}

.hero__eyebrow-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  animation: hero-pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes hero-pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.08);
    transform: scale(1.1);
  }
}

/* ── Title (H1) with gradient accent ── */

.hero__title {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--text);
  margin-bottom: var(--sp-5);
  font-weight: 900;
}

.hero__title-accent {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 60%, var(--brand-deep) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  display: inline-block;
}

/* ── Subtitle ── */

.hero__sub {
  font-size: clamp(15px, 1.65vw, 18px);
  line-height: 1.75;
  color: var(--text-soft);
  margin-bottom: var(--sp-8);
  max-width: 540px;
  font-weight: 500;
}

.hero__sub strong {
  color: var(--text);
  font-weight: 800;
}

/* ── CTAs ── */

.hero__ctas {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Note: .btn is a shared component; we define it here scoped to .hero__ctas
   to avoid touching global namespace. لو في buttons تانية في الصفحة بـ نفس
   الـ pattern (M1.3, M1.4), هـ نـ extract لـ shared button.css component. */
.hero__ctas .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 16px 26px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none; /* للـ <a> الـ ghost */
}

.hero__ctas .btn .icon {
  width: 18px;
  height: 18px;
}

.hero__ctas .btn--primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255,255,255,0.20);
  position: relative;
  overflow: hidden;
}

.hero__ctas .btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.hero__ctas .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(137, 96, 199, 0.40), inset 0 1px 0 rgba(255,255,255,0.20);
}

.hero__ctas .btn--primary:hover::before {
  transform: translateX(100%);
}

.hero__ctas .btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.hero__ctas .btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--brand);
  color: var(--brand-soft);
}


/* ══════════════════════════════════════════════════════════════════════════════
   4. HERO VIZ — TV + ripples + floating tags
   ══════════════════════════════════════════════════════════════════════════════ */

.hero__viz {
  position: relative;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viz {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1.2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Brand glow behind everything */
.viz__glow {
  position: absolute;
  inset: 10%;
  background: radial-gradient(circle at 50% 50%, var(--viz-glow), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}

/* Concentric ripples behind the TV */
.viz__ripples {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--ripple-color);
  width: 70%;
  aspect-ratio: 1;
  opacity: 0;
}

.ripple--1 { animation: hero-ripple-out 4s ease-out infinite; }
.ripple--2 { animation: hero-ripple-out 4s ease-out infinite 1.3s; }
.ripple--3 { animation: hero-ripple-out 4s ease-out infinite 2.6s; }

@keyframes hero-ripple-out {
  0%   { opacity: 0; transform: scale(0.6); border-width: 2px; }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.35); border-width: 0.5px; }
}

/* ── TV frame ── */

.tv {
  position: relative;
  width: 70%;
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, var(--tv-frame-1) 0%, var(--tv-frame-2) 100%);
  border: 2px solid var(--tv-border);
  border-radius: 22px;
  padding: 14px;
  box-shadow:
    0 30px 60px -10px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 40px var(--tv-glow);
  z-index: 2;
}

/* Top edge highlight (subtle) */
.tv::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

/* TV base/stand shadow */
.tv::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 8px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.40), transparent 70%);
  filter: blur(6px);
  border-radius: 50%;
  pointer-events: none;
}

/* Screen interior */
.tv__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--tv-screen-bg-1) 0%, var(--tv-screen-bg-2) 100%);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle radial spotlight on screen */
.tv__screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
}

/* Scanlines (very subtle) */
.tv__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    rgba(255, 255, 255, 0.025) 3px 4px
  );
  pointer-events: none;
}

/* IPTV stencil text on screen */
.tv__iptv {
  font-family: var(--font-display);
  font-size: clamp(46px, 8vw, 86px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  color: transparent;
  -webkit-text-stroke: 2px var(--tv-iptv-stroke);
          text-stroke: 2px var(--tv-iptv-stroke);
  user-select: none;
  position: relative;
  z-index: 1;
}

/* LED indicator at bottom of TV frame */
.tv__led {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.60);
  animation: hero-led-pulse 2.5s ease-in-out infinite;
}
@keyframes hero-led-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* ── 4K · HDR tag — floating top-right ── */

.tag-4k {
  position: absolute;
  top: 10%;
  right: 6%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #F5B642 0%, #B8860B 100%);
  color: #1A1206;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3px;
  border-radius: 50px;
  box-shadow:
    0 8px 24px rgba(245, 182, 66, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
  z-index: 5;
  animation: hero-float-tag 5s ease-in-out infinite;
}

.tag-4k::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1A1206;
}

@keyframes hero-float-tag {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-8px) rotate(-2deg); }
}

/* ── WhatsApp tag — floating bottom-left ── */

.tag-wa {
  position: absolute;
  bottom: 8%;
  left: 4%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  z-index: 5;
  animation: hero-float-wa 6s ease-in-out infinite -2s;
}

.tag-wa .icon {
  width: 14px;
  height: 14px;
  color: #25D366;
  flex-shrink: 0;
}

@keyframes hero-float-wa {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}


/* ══════════════════════════════════════════════════════════════════════════════
   5. RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */

/* Tablet: stack columns */
@media (max-width: 1080px) {
  .hero__container {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .hero__viz {
    height: auto;
    min-height: 380px;
    padding: var(--sp-6) 0;
  }
  .viz {
    max-width: 420px;
    margin: 0 auto;
  }
  .kw--xxl { font-size: clamp(70px, 14vw, 130px); }
  .kw--xl  { font-size: clamp(48px, 9vw,  80px); }
}

/* Small tablet / large phone */
@media (max-width: 720px) {
  .hero {
    padding-top: calc(var(--nav-h) + var(--sp-6));
    padding-bottom: var(--sp-12);
  }
  .hero__viz { min-height: 340px; }
  .viz { max-width: 340px; }
  .tag-4k { padding: 7px 12px; font-size: 11px; }
  .tag-wa { padding: 7px 12px; font-size: 10.5px; }
  .hero__ctas .btn { padding: 14px 22px; font-size: 13.5px; }
  /* Hide some keywords to reduce clutter on smaller screens */
  .kw--3, .kw--6, .kw--9, .kw--13 { display: none; }
  .hero__eyebrow { font-size: 11.5px; }
}

/* Phone */
@media (max-width: 480px) {
  .hero__title { font-size: 30px; }
  .hero__sub { font-size: 14.5px; }
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; }
  /* Further reduce keyword clutter */
  .kw--7, .kw--10, .kw--11 { display: none; }
  .viz { max-width: 300px; }
  .hero__viz { min-height: 300px; }
  .tag-4k { top: 4%; right: 2%; padding: 6px 10px; font-size: 10px; }
  .tag-wa { bottom: 4%; left: 2%; padding: 6px 10px; font-size: 10px; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   6. REDUCED-MOTION ACCESSIBILITY
   ══════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .kw,
  .ripple,
  .tag-4k,
  .tag-wa,
  .tv__led,
  .hero__eyebrow-badge::after,
  .hero__eyebrow-pulse {
    animation: none;
  }
}
