/* Homepage redesign — scoped under .hp-page */

.hp-page {
  font-family: "Manrope", system-ui, sans-serif;
}

.hp-wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

/* Brand hero: logo left + slideshow right (happywars.net-inspired) */
.hp-hero {
  position: relative;
  isolation: isolate;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(105deg, rgba(7, 10, 24, 0.94) 0%, rgba(7, 10, 24, 0.78) 48%, rgba(7, 10, 24, 0.55) 100%),
    var(--hp-hero-img) center / cover no-repeat;
  transform: scale(1.03);
  animation: hp-hero-drift 20s ease-in-out infinite alternate;
}

.hp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 12% 70%, rgba(255, 106, 0, 0.28) 0%, transparent 48%),
    radial-gradient(ellipse at 88% 25%, rgba(255, 210, 74, 0.12) 0%, transparent 42%);
  pointer-events: none;
}

@keyframes hp-hero-drift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1%, -1%, 0); }
}

.hp-hero-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
}

.hp-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hp-hero-logo {
  margin: 0 0 16px;
  animation: hp-fade-up 0.7s ease both;
}

.hp-hero-logo img {
  display: block;
  width: clamp(260px, 42vw, 560px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.55));
}

.hp-hero-lead {
  margin: 0 0 20px;
  max-width: 34rem;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  animation: hp-fade-up 0.7s ease 0.08s both;
}

.hp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  animation: hp-fade-up 0.7s ease 0.14s both;
}

.hp-page .hp-hero-media .hw-slider--event {
  width: 100%;
  max-width: 640px;
  min-width: 0;
}

.hp-page .hp-hero-media {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding-top: 0;
  animation: hp-fade-up 0.7s ease 0.18s both;
  overflow: hidden;
}

.hp-page .hp-hero-media .hw-slider--event .hw-slider-viewport {
  aspect-ratio: 16 / 9;
  max-height: none;
}

.hp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.hp-pill-link:hover {
  border-color: rgba(255, 210, 74, 0.55);
  color: #ffd24a;
}

.hp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: hp-fade-up 0.7s ease 0.22s both;
}

@keyframes hp-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hp-btn-primary {
  background: linear-gradient(135deg, #ff6a00 0%, #ffd24a 100%);
  color: #1a0f00;
  box-shadow: 0 12px 30px rgba(255, 106, 0, 0.35);
}

.hp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(255, 106, 0, 0.45);
}

.hp-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hp-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Sections */
.hp-section {
  padding: 72px 0;
}

.hp-section-head {
  margin-bottom: 28px;
  max-width: 40rem;
}

.hp-section-head h2 {
  margin: 0 0 8px;
  font-family: "Bebas Neue", "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.04em;
  color: #fff;
}

.hp-section-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* News polish on homepage — official list layout */
.hp-page .news-section {
  background: transparent;
  padding: 56px 0;
}

.hp-page .news-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 18, 0.88);
  overflow: hidden;
}

.hp-page .news-panel-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 72px;
  height: 72px;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.14) 3px,
    transparent 3px,
    transparent 9px
  );
  opacity: 0.55;
}

.hp-page .news-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-page .news-filter-bar--bottom {
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-page .news-filter-link {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hp-page .news-filter-link:hover,
.hp-page .news-filter-link.is-active {
  color: #ffd24a;
}

.hp-page .news-filter-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  user-select: none;
}

.hp-page .news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-page .news-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-page .news-row:last-child {
  border-bottom: none;
}

.hp-page .news-row.is-hidden {
  display: none;
}

.hp-page .news-row-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 255, 136, 0.55);
  border-radius: 6px;
  background: transparent;
  color: #7ef3b8;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hp-page .news-row-tag--events {
  border-color: rgba(0, 255, 136, 0.55);
  color: #7ef3b8;
}

.hp-page .news-row-tag--news {
  border-color: rgba(120, 170, 255, 0.55);
  color: #9ec0ff;
}

.hp-page .news-row-tag--blog {
  border-color: rgba(255, 210, 74, 0.55);
  color: #ffe7a0;
}

.hp-page .news-row-tag--maintenance {
  border-color: rgba(255, 106, 0, 0.55);
  color: #ffb27a;
}

.hp-page .news-row-body {
  min-width: 0;
}

.hp-page .news-row-title {
  display: inline;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.45;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp-page .news-row-title:hover {
  color: #ffd24a;
}

.hp-page .news-row-new {
  display: inline;
  margin-left: 8px;
  color: #ff2d2d;
  font-size: 0.95rem;
  font-weight: 900;
  text-decoration: none;
}

.hp-page .news-row-date {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.82rem;
  font-weight: 600;
}

.hp-page .news-view-all {
  margin: 18px 0 0;
  text-align: center;
}

.hp-page .news-view-all a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.hp-page .news-view-all a:hover {
  color: #ffd24a;
}

@media (max-width: 720px) {
  .hp-page .news-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hp-page .news-row-tag {
    justify-content: flex-start;
    width: fit-content;
  }
}

/* Games + community spacing */
.hp-page .games-showcase {
  padding: 48px 0 28px;
}

.hp-page .hp-community {
  padding-top: 12px;
  padding-bottom: 56px;
}

/* Community */
.hp-community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.hp-community-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hp-community-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 106, 0, 0.5);
  background: rgba(255, 106, 0, 0.1);
}

.hp-community-card i {
  font-size: 1.6rem;
  color: #ffd24a;
}

.hp-community-card strong {
  font-size: 1.1rem;
  color: #fff;
}

.hp-community-card span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Neutralize old two-column hero rules when this page is active */
.hp-page .hero {
  display: none;
}

@media (max-width: 980px) {
  .hp-wrap,
  .hp-hero-inner {
    width: min(100% - 32px, 1200px);
  }

  .hp-hero {
    min-height: auto;
  }

  .hp-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0 36px;
  }

  .hp-hero-text {
    align-items: flex-start;
  }

  .hp-page .hp-hero-media .hw-slider--event {
    max-width: 100%;
  }

  .hp-community-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .hp-community-grid {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  .hp-hero-bg,
  .hp-hero-logo,
  .hp-hero-lead,
  .hp-hero-meta,
  .hp-hero-cta,
  .hp-page .news-card {
    animation: none !important;
    transition: none !important;
  }
}
