/* ============================================
   MELOVAR'S TALE — Landing Page Styles
   ============================================ */

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--surface-950);
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-character {
  position: absolute;
  right: -5%;
  bottom: 0;
  width: 55%;
  max-width: 750px;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 2;
  mask-image: linear-gradient(
    to left,
    transparent 0%,
    black 15%,
    black 85%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to left,
    transparent 0%,
    black 15%,
    black 85%,
    transparent 100%
  );
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-overlay);
  z-index: 3;
}

.hero-overlay-left {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-overlay-left);
  z-index: 4;
}

/* Ember particle canvas */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 0 var(--space-xl);
  max-width: var(--container-wide);
  margin: 0 auto;
  width: 100%;
  padding-top: var(--header-height);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fire-400);
  border: 1px solid hsla(20, 100%, 50%, 0.3);
  background: hsla(20, 100%, 50%, 0.06);
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s ease forwards;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fire-400);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-accent);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  max-width: 600px;
  animation: fadeInUp 0.8s ease 0.15s forwards;
  opacity: 0;
}

.hero-title .title-line-1 {
  display: block;
  color: var(--text-primary);
  text-shadow: 0 0 40px hsla(210, 100%, 56%, 0.15);
}

.hero-title .title-line-2 {
  display: block;
  background: var(--gradient-azure-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px hsla(20, 100%, 50%, 0.3));
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 45ch;
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
  animation: fadeInUp 0.8s ease 0.45s forwards;
  opacity: 0;
}

.hero-stats {
  display: flex;
  gap: var(--space-3xl);
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.hero-stat {
  text-align: left;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.hero-stat-number.azure {
  color: var(--azure-400);
  text-shadow: var(--glow-text-azure);
}

.hero-stat-number.fire {
  color: var(--fire-400);
  text-shadow: var(--glow-text-fire);
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* ── About / Features Section ── */
.features-section {
  position: relative;
  background: var(--surface-950);
  overflow: hidden;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

/* ── Characters Section ── */
.characters-section {
  position: relative;
  background: var(--surface-900);
  overflow: hidden;
}

.characters-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(ellipse at center top, hsla(210, 100%, 50%, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2xl);
  max-width: 900px;
  margin: 0 auto;
}

.character-card-image-wrapper {
  overflow: hidden;
  position: relative;
}

.character-card-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(transparent, var(--glass-bg));
  pointer-events: none;
}

/* ── Screenshots / Showcase Section ── */
.showcase-section {
  position: relative;
  background: var(--surface-950);
  overflow: hidden;
}

.showcase-image-wrapper {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-elevated);
  position: relative;
}

.showcase-image-wrapper img {
  width: 100%;
  display: block;
}

.showcase-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px hsla(220, 30%, 5%, 0.6);
  pointer-events: none;
}

/* ── CTA Banner Section ── */
.cta-section {
  position: relative;
  background: var(--surface-900);
  overflow: hidden;
  text-align: center;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 50%, hsla(210, 100%, 50%, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, hsla(20, 100%, 50%, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  margin-bottom: var(--space-md);
}

.cta-content p {
  margin: 0 auto var(--space-2xl);
  font-size: 1.1rem;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-character {
    width: 50%;
    right: -8%;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
  }

  .hero-character {
    width: 100%;
    right: 0;
    opacity: 0.25;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .hero-overlay-left {
    background: linear-gradient(
      180deg,
      hsla(220, 30%, 5%, 0.6) 0%,
      hsla(220, 30%, 5%, 0.8) 50%,
      var(--surface-950) 100%
    );
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-stats {
    gap: var(--space-2xl);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .characters-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-lg);
  }
}
