/* ==========================================================================
   HDM Marketing Theme — Hero Section (Matches Design Mockup v2)
   ========================================================================== */

.hero-section {
  position: relative;
  padding-block: 140px 80px;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* ── Background Effects ── */
.hero-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57, 255, 20, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, 0.07) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse 80% 70% at 35% 50%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 35% 50%, black 30%, transparent 75%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
}

.hero-glow--1 {
  top: 10%;
  left: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.08) 0%, transparent 70%);
}

.hero-glow--2 {
  bottom: -10%;
  left: 30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.05) 0%, transparent 70%);
}

/* Floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: particlePulse 4s ease-in-out infinite;
}

@keyframes particlePulse {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* ── Two-column grid ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Text Content (right side in RTL) ── */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-content .section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-content .section-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-headline {
  font-size: clamp(36px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.hero-headline--he {
  font-family: 'Heebo', sans-serif;
  letter-spacing: 0;
  direction: rtl;
}

.hero-headline .accent {
  color: var(--accent);
  position: relative;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 480px;
  font-family: 'Heebo', sans-serif;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ── 3D Floating Dashboard ── */
.hero-dashboard {
  position: relative;
  height: 500px;
  perspective: 1200px;
}

/* ── Background Chart ── */
.dashboard-bg-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

/* ── Shared card style ── */
.dash-card {
  position: absolute;
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.9));
  border: 1px solid rgba(57, 255, 20, 0.15);
  border-radius: 16px;
  padding: 22px 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(57, 255, 20, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.dash-card:hover {
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(57, 255, 20, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dash-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dash-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dash-card__badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(57, 255, 20, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
}

.dash-card__badge--down {
  color: var(--accent);
}

.dash-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dash-card__period {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Inter', sans-serif;
}

.dash-card__value {
  font-size: 38px;
  font-weight: 800;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  line-height: 1.1;
  margin-bottom: 6px;
}

/* ── ROAS Card (top-left of dashboard) ── */
.dash-card--roas {
  top: 0;
  left: 0;
  width: 300px;
  z-index: 3;
  transform: rotateY(4deg) rotateX(2deg);
}

.dash-card--roas:hover {
  transform: rotateY(2deg) rotateX(1deg) translateY(-4px);
}

.dash-card--roas .dash-card__value {
  font-size: 46px;
}

.dash-card__chart {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.line-chart {
  width: 100%;
  height: 65px;
  display: block;
}

/* ── Conversions Card (bottom-left) ── */
.dash-card--conv {
  bottom: 30px;
  left: 0;
  width: 270px;
  z-index: 2;
  transform: rotateY(4deg) rotateX(-2deg) translateZ(-20px);
}

.dash-card--conv:hover {
  transform: rotateY(2deg) rotateX(-1deg) translateZ(-10px) translateY(-4px);
}

.dash-card--conv .dash-card__value {
  font-size: 34px;
  margin-bottom: 4px;
}

.dash-card--conv .dash-card__period {
  display: block;
  margin-bottom: 8px;
}

.bar-chart {
  width: 100%;
  height: 45px;
  display: block;
}

/* ── Cost Card (right side) ── */
.dash-card--cost {
  top: 40%;
  right: 0;
  width: 240px;
  z-index: 1;
  transform: rotateY(-6deg) rotateX(4deg) translateZ(-30px);
}

.dash-card--cost:hover {
  transform: rotateY(-3deg) rotateX(2deg) translateZ(-15px) translateY(-4px);
}

.dash-card--cost .dash-card__value {
  font-size: 32px;
}

.dash-card__sparkline {
  width: 100%;
  height: 28px;
}

.dash-card__sparkline svg {
  width: 100%;
  height: 100%;
}

/* ── Network Lines & Icon Nodes (all inside SVG) ── */
.network-lines {
  position: absolute;
  top: -30px;
  bottom: -30px;
  left: -30px;
  right: -80px;
  width: calc(100% + 110px);
  height: calc(100% + 60px);
  z-index: 5;
  pointer-events: none;
  opacity: 1;
  animation: networkFadeIn 1.2s ease-out;
}

@keyframes networkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Dashboard ambient glow ── */
.hero-dashboard::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.06) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .hero-headline {
    font-size: 36px;
  }
  .hero-dashboard {
    height: 420px;
  }
  .dash-card--roas { width: 260px; }
  .dash-card--conv { width: 240px; }
  .dash-card--cost { width: 210px; }
}

@media (max-width: 768px) {
  .hero-section {
    padding-block: 120px 60px;
    min-height: auto;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-headline {
    font-size: 32px;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    text-align: center;
  }
  /* Stack the dashboard cards vertically (no absolute overlap) */
  .hero-dashboard {
    height: auto;
    perspective: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .hero-dashboard::before {
    display: none;
  }
  .dash-card {
    position: static;
    width: 100% !important;
    transform: none !important;
    max-width: 360px;
    margin-inline: auto;
  }
  .hero-grid-lines,
  .network-lines,
  .dashboard-bg-chart {
    display: none;
  }
}

@media (max-width: 480px) {
  .dash-card__value { font-size: 30px !important; }
  .dash-card--roas .dash-card__value { font-size: 38px !important; }
}
