.page-home {
  --home-gold: #D4A24E;
  --home-gold-soft: rgba(212, 162, 78, 0.35);
  --home-cyan-soft: rgba(0, 212, 255, 0.2);
  --home-purple-soft: rgba(139, 48, 245, 0.18);
  --home-orange-soft: rgba(255, 107, 0, 0.22);
  --home-panel-bg: rgba(5, 7, 13, 0.55);
  --home-panel-border: rgba(184, 192, 204, 0.16);
  background-color: var(--night);
  color: var(--moon);
  overflow-x: hidden;
}

.page-home [id] {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.page-home .home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(720px, 100vh);
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.72) 0%, rgba(10, 20, 40, 0.42) 45%, var(--night) 96%);
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(100deg, var(--gold) 0%, var(--purple) 55%, var(--cyan) 100%);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 58%);
  opacity: 0.82;
  z-index: 2;
  pointer-events: none;
}

.page-home .home-hero__bg {
  position: absolute;
  inset: 0;
}

.page-home .home-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.page-home .home-hero__layout {
  position: relative;
  z-index: 1;
  width: 100%;
}

.page-home .home-hero__content {
  max-width: 680px;
}

.page-home .home-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: 0.01em;
  margin: 16px 0 20px;
  color: var(--moon);
  text-shadow: 0 0 40px rgba(212, 162, 78, 0.35);
}

.page-home .home-hero__lead {
  color: var(--fog);
  font-size: clamp(1rem, 1vw, 1.12rem);
  line-height: 1.8;
  max-width: 36em;
  margin-bottom: 28px;
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .home-hero__cards {
  margin-top: 40px;
  display: grid;
  gap: 14px;
}

.page-home .home-dlcard {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.page-home .home-dlcard__body {
  flex: 1 1 auto;
  min-width: 0;
}

.page-home .home-dlcard__title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 900;
}

.page-home .home-dlcard__text {
  margin: 0 0 12px;
  color: var(--fog);
  font-size: 0.9rem;
  line-height: 1.6;
}

.page-home .home-dlcard__img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 4px 16px 4px 16px;
  filter: saturate(1.2);
  flex: 0 0 auto;
}

.page-home .home-open {
  padding: 18px;
}

.page-home .home-open__server {
  margin: 10px 0 0;
  color: var(--moon);
  font-weight: 700;
  font-size: 1.05rem;
}

.page-home .home-open__time {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--cyan);
  line-height: 1;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px var(--home-cyan-soft);
  animation: homePulse 2s ease-in-out infinite;
}

.page-home .home-open__hint {
  color: var(--fog);
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.page-home .home-giftcard {
  padding: 18px;
  border-left: 4px solid var(--orange);
  background: linear-gradient(145deg, rgba(255, 107, 0, 0.16), rgba(10, 20, 40, 0.55));
}

.page-home .home-giftcard__title {
  font-weight: 900;
  margin: 8px 0 6px;
  font-size: 1.1rem;
  line-height: 1.4;
}

.page-home .home-giftcard__text {
  color: var(--fog);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

@keyframes homePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.page-home .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(212, 162, 78, 0.2);
}

.page-home .toc__label {
  color: var(--fog);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  margin-right: 6px;
}

.page-home .toc__link {
  padding: 6px 14px;
  border: 1px solid var(--home-panel-border);
  border-radius: 999px;
  color: var(--moon);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.page-home .toc__link:hover,
.page-home .toc__link.is-active {
  background: rgba(212, 162, 78, 0.14);
  border-color: var(--home-gold-soft);
  color: var(--gold);
}

.page-home .home-servers,
.page-home .home-gift,
.page-home .home-cases,
.page-home .home-data,
.page-home .home-shortcuts {
  padding-top: 64px;
  padding-bottom: 64px;
}

.page-home .section-title {
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  font-weight: 900;
  line-height: 1.2;
  margin: 6px 0 0;
  color: var(--moon);
}

.page-home .home-sec-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.page-home .home-sec-head__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-home .home-sec-head__meta {
  color: var(--fog);
  font-size: 0.9rem;
  margin: 0;
}

.page-home .kicker--gold { color: var(--gold); }
.page-home .kicker--purple { color: var(--purple); }
.page-home .kicker--orange { color: var(--orange); }
.page-home .kicker--cyan { color: var(--cyan); }

.page-home .home-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.page-home .home-filter__item {
  padding: 6px 14px;
  border: 1px solid var(--home-panel-border);
  border-radius: 999px;
  background: rgba(10, 20, 40, 0.5);
  color: var(--fog);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.page-home .home-filter__item:hover,
.page-home .home-filter__item.is-active {
  color: var(--moon);
  border-color: var(--gold);
  background: rgba(212, 162, 78, 0.16);
}

.page-home .server-board {
  position: relative;
  overflow: hidden;
  padding: 22px;
  margin-bottom: 24px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 0 28px 0 28px;
  background: rgba(5, 7, 13, 0.62);
}

.page-home .server-board__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
}

.page-home .server-board__rows {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
}

.page-home .server-group {
  margin-bottom: 0;
}

.page-home .server-group__title {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.08em;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.18);
}

.page-home .server-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: rgba(10, 20, 40, 0.72);
  border-left: 3px solid rgba(212, 162, 78, 0.7);
  transition: transform 0.2s, border-color 0.2s;
}

.page-home .server-card:hover {
  transform: translateX(4px);
  border-left-color: var(--cyan);
}

.page-home .server-card__main {
  min-width: 0;
}

.page-home .server-card__name {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--moon);
}

.page-home .server-card__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--fog);
}

.page-home .server-card__timer {
  flex: 0 0 auto;
  text-align: right;
}

.page-home .server-card__time {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.22rem;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  animation: homePulse 2.4s ease-in-out infinite;
}

.page-home .server-card__count {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--fog);
}

.page-home .home-servers__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .home-gift {
  background: linear-gradient(180deg, rgba(10, 20, 40, 0.6) 0%, rgba(18, 30, 54, 0.55) 55%, var(--night) 100%);
}

.page-home .gift-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.page-home .gift-card {
  flex: 0 0 260px;
  min-height: 190px;
  scroll-snap-align: start;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border-radius: 0 20px 0 20px;
  background: rgba(10, 20, 40, 0.8);
  border: 1px solid var(--home-panel-border);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.page-home .gift-card:hover {
  transform: translateY(-4px);
}

.page-home .gift-card--current {
  border: 2px solid var(--gold);
  background: linear-gradient(145deg, rgba(212, 162, 78, 0.18), rgba(10, 20, 40, 0.85));
  box-shadow: 0 14px 40px rgba(212, 162, 78, 0.14);
}

.page-home .gift-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.page-home .gift-card__month {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--moon);
}

.page-home .gift-card--current .gift-card__month {
  color: var(--gold);
}

.page-home .gift-card__title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--moon);
}

.page-home .gift-card__text {
  color: var(--fog);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.page-home .home-cases__banner {
  position: relative;
  overflow: hidden;
  border-radius: 0 28px 0 28px;
  border: 1px solid rgba(139, 48, 245, 0.4);
  margin-bottom: 28px;
}

.page-home .home-cases__banner img {
  display: block;
  width: 100%;
  height: auto;
}

.page-home .case-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.page-home .case-card {
  padding: 22px;
  background: rgba(10, 20, 40, 0.75);
  border-radius: 0 18px 0 18px;
  border: 1px solid var(--home-panel-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-home .case-card__title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 12px 0 8px;
  line-height: 1.45;
  color: var(--moon);
}

.page-home .case-card__text {
  color: var(--fog);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 4px;
}

.page-home .case-card a {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.page-home .case-card a:hover {
  color: var(--cyan);
}

.page-home .home-cases__actions {
  display: flex;
  justify-content: center;
}

.page-home .home-data {
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 48, 245, 0.3), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(0, 212, 255, 0.18), transparent 45%),
    var(--black);
}

.page-home .data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.page-home .data-cell {
  padding: 22px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-home .data-cell__num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--gold);
}

.page-home .data-cell__num small {
  font-size: 0.55em;
  color: var(--fog);
  margin-left: 2px;
  font-weight: 700;
}

.page-home .data-cell__label {
  color: var(--fog);
  font-size: 0.86rem;
}

.page-home .home-shortcuts__grid {
  display: grid;
  gap: 18px;
}

.page-home .home-shortcut-card {
  padding: 26px;
  background: linear-gradient(145deg, rgba(212, 162, 78, 0.14), rgba(10, 20, 40, 0.6));
  border-radius: 0 24px 0 24px;
  border: 1px solid rgba(212, 162, 78, 0.28);
}

.page-home .home-shortcut-card__title {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--moon);
}

.page-home .home-shortcut-card__text {
  color: var(--fog);
  line-height: 1.7;
  margin-bottom: 18px;
}

.page-home .home-shortcut-card__tip {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--moon);
  background: rgba(139, 48, 245, 0.2);
  border-radius: 4px 12px 4px 12px;
}

.page-home .home-shortcut-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.page-home .home-shortcut-link {
  display: block;
  padding: 16px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 14px 0 14px;
  color: var(--moon);
  text-decoration: none;
  font-weight: 800;
  transition: background-color 0.2s, transform 0.2s;
}

.page-home .home-shortcut-link span {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--fog);
}

.page-home .home-shortcut-link:hover {
  background: rgba(212, 162, 78, 0.12);
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .page-home .data-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .page-home .home-shortcut-links {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home .home-open__time {
    font-size: 3rem;
  }
}

@media (min-width: 960px) {
  .page-home .home-hero {
    min-height: 680px;
    padding-top: calc(var(--header-h) + 40px);
  }

  .page-home .home-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 56px;
    align-items: center;
  }

  .page-home .home-hero__cards {
    margin-top: 0;
    grid-template-columns: 1fr 1fr;
  }

  .page-home .home-dlcard {
    grid-column: 1 / -1;
  }

  .page-home .home-dlcard__img {
    width: 120px;
    height: 120px;
  }

  .page-home .home-sec-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .page-home .home-sec-head__meta {
    text-align: right;
  }

  .page-home .server-board__rows {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .gift-strip {
    flex-wrap: wrap;
    overflow: visible;
  }

  .page-home .gift-card {
    flex: 1 1 0;
    min-width: 220px;
  }

  .page-home .case-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .page-home .home-shortcuts__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }
}
