/**
 * Window.Events - Homepage Styles
 * Cyberpunk styled front page
 */

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-20) var(--space-4);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero__grid {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(var(--neon-purple) 1px, transparent 1px),
    linear-gradient(90deg, var(--neon-purple) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.08;
  transform: perspective(500px) rotateX(60deg);
  animation: hero-grid-move 30s linear infinite;
}

@keyframes hero-grid-move {
  0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

.hero__particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--neon-purple);
  border-radius: var(--radius-full);
  font-family: var(--font-code);
  font-size: var(--font-size-sm);
  color: var(--neon-purple);
  margin-bottom: var(--space-6);
}

.hero__label-icon {
  color: var(--neon-cyan);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--font-size-6xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-cyan) 50%, var(--neon-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.hero__subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  line-height: var(--line-height-relaxed);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin-bottom: var(--space-12);
}

.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--neon-purple), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: var(--space-12) 0;
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-10);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section__title-icon {
  color: var(--neon-pink);
  font-family: var(--font-code);
}

.section__link {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neon-cyan);
}

.section__link:hover {
  color: var(--neon-pink);
}

/* ========================================
   FEATURED CARD
   ======================================== */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.featured-card:hover {
  border-color: var(--neon-purple);
  box-shadow: var(--shadow-neon);
}

.featured-card__image {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.featured-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-card:hover .featured-card__image img {
  transform: scale(1.05);
}

.featured-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 0%, rgba(10, 10, 15, 0.8) 100%);
}

.featured-card__content {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
}

.featured-card__category {
  color: var(--neon-cyan);
  font-family: var(--font-code);
  text-transform: uppercase;
}

.featured-card__date,
.featured-card__reading-time {
  color: var(--text-muted);
}

.featured-card__title {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

.featured-card__title a {
  color: var(--text-primary);
}

.featured-card__title a:hover {
  color: var(--neon-pink);
  text-shadow: var(--glow-pink-subtle);
}

.featured-card__excerpt {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-6);
}

/* ========================================
   CATEGORY GRID
   ======================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--space-4);
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-normal);
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card--pink:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
}

.category-card--cyan:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.category-card--purple:hover {
  border-color: var(--neon-purple);
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.2);
}

.category-card--green:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.category-card--yellow:hover {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.2);
}

.category-card--orange:hover {
  border-color: var(--neon-orange);
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.2);
}

.category-card__icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.category-card--pink:hover .category-card__icon { color: var(--neon-pink); }
.category-card--cyan:hover .category-card__icon { color: var(--neon-cyan); }
.category-card--purple:hover .category-card__icon { color: var(--neon-purple); }
.category-card--green:hover .category-card__icon { color: var(--neon-green); }
.category-card--yellow:hover .category-card__icon { color: var(--neon-yellow); }
.category-card--orange:hover .category-card__icon { color: var(--neon-orange); }

.category-card__title {
  font-family: var(--font-display);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.category-card__count {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ========================================
   POSTS GRID
   ======================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
}

.post-card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.post-card:hover {
  border-color: var(--neon-purple);
  transform: translateY(-4px);
  box-shadow: var(--shadow-neon);
}

.post-card__image {
  display: block;
  overflow: hidden;
  height: 180px;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-card__image img {
  transform: scale(1.05);
}

.post-card__content {
  padding: var(--space-5);
}

.post-card__meta {
  margin-bottom: var(--space-3);
}

.post-card__title {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
  line-height: var(--line-height-tight);
}

.post-card__title a {
  color: var(--text-primary);
}

.post-card__title a:hover {
  color: var(--neon-cyan);
}

.post-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

.post-card__footer {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ========================================
   NEWSLETTER BOX
   ======================================== */
.section--newsletter {
  padding: var(--space-10) 0;
}

.newsletter-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-10);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: var(--border-width) solid var(--neon-purple);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 40px rgba(157, 78, 221, 0.1);
}

.newsletter-box__content {
  flex: 1;
}

.newsletter-box__title {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.newsletter-box__text {
  color: var(--text-secondary);
  margin: 0;
}

.newsletter-box__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  flex-shrink: 0;
  align-items: flex-end;
}

.newsletter-box__label {
  width: 100%;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.newsletter-box__input {
  width: 300px;
  padding: var(--space-4);
  background: var(--bg-primary);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-size-base);
}

.newsletter-box__input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan-subtle);
}

.newsletter-box__input:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero__title {
    font-size: var(--font-size-5xl);
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-card__image {
    min-height: 250px;
  }

  .newsletter-box {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-box__form {
    width: 100%;
    flex-direction: column;
  }

  .newsletter-box__input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-12)) var(--space-4) var(--space-12);
  }

  .hero__title {
    font-size: var(--font-size-4xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-base);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

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

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