.home-public-page {
  background: var(--bg);
}

.home-page {
  gap: 10px;
}

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(124, 92, 255, .28);
  border-radius: var(--public-radius-lg);
  background:
    linear-gradient(90deg, rgba(5, 6, 12, .84) 0%, rgba(8, 9, 17, .58) 43%, rgba(8, 9, 17, .18) 100%),
    var(--home-hero-image) center / cover no-repeat,
    #09070f;
  box-shadow: 0 28px 72px rgba(0, 0, 0, .34);
  isolation: isolate;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 6, 12, .62), transparent 58%),
    linear-gradient(0deg, rgba(5, 6, 12, .36), transparent 34%);
}

.home-hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: .92;
}

.home-hero-glow {
  position: absolute;
  left: 18%;
  bottom: 16%;
  z-index: 2;
  width: 320px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(48, 224, 238, .18), transparent 70%);
  filter: blur(18px);
  opacity: .8;
  transform: translate3d(var(--hero-glow-x, 0), var(--hero-glow-y, 0), 0);
  transition: transform .18s ease-out;
}

.home-hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 58px);
  bottom: clamp(24px, 5vw, 58px);
  z-index: 3;
  width: min(560px, calc(100% - 48px));
  padding: clamp(20px, 2.8vw, 34px);
  border: 1px solid rgba(99, 232, 242, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(10, 16, 28, .78), rgba(23, 18, 39, .72));
  box-shadow: 0 0 36px rgba(48, 224, 238, .14);
  backdrop-filter: blur(16px);
}

.home-hero h1 {
  margin: 0;
  max-width: 520px;
  color: #fff;
  font-size: clamp(32px, 4.3vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.home-hero p {
  margin: 16px 0 0;
  color: #d5cff0;
  font-size: 16px;
  line-height: 1.55;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.home-stats div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-stats strong {
  color: #fff;
  font-family: var(--public-font-heading);
  font-size: 20px;
  line-height: 1;
}

.home-stats span {
  color: #bdb4d9;
  font-size: 11px;
  line-height: 1.35;
}

.home-ticker {
  overflow: hidden;
  padding: 9px 0;
  border: 1px solid rgba(124, 92, 255, .16);
  border-radius: 999px;
  background: rgba(31, 25, 52, .72);
}

.home-ticker-track {
  display: flex;
  width: max-content;
  gap: 56px;
  animation: homeTicker 28s linear infinite;
}

.home-ticker-track span {
  white-space: nowrap;
  color: #bfb7d9;
  font-size: 12px;
}

@keyframes homeTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.home-section,
.home-request,
.home-contest {
  border: 1px solid rgba(124, 92, 255, .24);
  border-radius: var(--public-radius-lg);
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 73, 184, .08), transparent 28%),
    linear-gradient(135deg, rgba(22, 40, 55, .52), rgba(31, 25, 52, .72));
}

.home-section {
  padding: clamp(22px, 2.7vw, 34px);
}

.home-section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.home-section-head h2,
.home-request h2,
.home-contest h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.08;
}

.home-section-head p,
.home-request p,
.home-contest p {
  max-width: 720px;
  margin: 8px 0 0;
  color: #c9c1e2;
  font-size: 15px;
  line-height: 1.55;
}

.home-wall {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-rows: 118px;
  gap: 10px;
}

.home-wall-tile {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(99, 232, 242, .18);
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  background: rgba(12, 14, 26, .8);
  transform: translateY(0);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.home-wall-tile.big {
  grid-column: span 2;
  grid-row: span 2;
}

.home-wall-tile.wide {
  grid-column: span 2;
}

.home-wall-tile.tall {
  grid-row: span 2;
}

.home-wall-tile.float {
  animation: none;
}

.home-wall-tile.float .home-wall-bg {
  animation: homeTileGlow 6s ease-in-out infinite;
  animation-delay: var(--fd, 0ms);
}

.home-wall-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 232, 242, .42);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .32);
}

.home-wall-bg {
  position: absolute;
  inset: 0;
  opacity: .92;
  background:
    radial-gradient(circle at 30% 28%, rgba(99, 232, 242, .34), transparent 28%),
    radial-gradient(circle at 78% 66%, rgba(255, 73, 184, .34), transparent 34%),
    linear-gradient(135deg, rgba(18, 38, 49, .92), rgba(25, 18, 42, .94));
  transition: transform .45s ease;
}

.home-wall-tile:hover .home-wall-bg {
  transform: scale(1.08);
}

.home-wall-tile.g2 .home-wall-bg { background: radial-gradient(circle at 70% 22%, rgba(255, 73, 184, .38), transparent 30%), linear-gradient(135deg, rgba(34, 23, 48, .95), rgba(13, 20, 34, .96)); }
.home-wall-tile.g3 .home-wall-bg { background: radial-gradient(circle at 28% 72%, rgba(124, 92, 255, .42), transparent 34%), linear-gradient(135deg, rgba(14, 36, 48, .94), rgba(37, 24, 52, .96)); }
.home-wall-tile.g4 .home-wall-bg { background: radial-gradient(circle at 50% 38%, rgba(227, 179, 65, .28), transparent 30%), linear-gradient(135deg, rgba(19, 31, 42, .95), rgba(48, 22, 44, .94)); }
.home-wall-tile.g5 .home-wall-bg { background: radial-gradient(circle at 38% 42%, rgba(99, 232, 242, .26), transparent 26%), radial-gradient(circle at 70% 78%, rgba(124, 92, 255, .32), transparent 32%), linear-gradient(135deg, rgba(12, 22, 34, .96), rgba(23, 18, 42, .96)); }
.home-wall-tile.g6 .home-wall-bg { background: radial-gradient(circle at 72% 34%, rgba(255, 73, 184, .32), transparent 30%), linear-gradient(135deg, rgba(22, 42, 50, .95), rgba(28, 20, 45, .95)); }

.home-wall-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 8px;
  border: 1px solid rgba(99, 232, 242, .32);
  border-radius: 999px;
  color: #aefaff;
  background: rgba(7, 10, 18, .55);
  font-size: 11px;
  font-weight: 850;
}

.home-wall-overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: grid;
  gap: 7px;
  padding: 13px;
  background: linear-gradient(0deg, rgba(5, 6, 12, .86), transparent);
}

.home-wall-overlay strong {
  font-size: 14px;
  line-height: 1.2;
}

.home-wall-overlay span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #bfb7d9;
  font-size: 11px;
}

.home-wall-overlay b {
  color: #fff;
  font-weight: 900;
}

.home-wall-overlay em {
  font-style: normal;
}

@keyframes homeTileGlow {
  0%, 100% {
    opacity: .88;
  }

  50% {
    opacity: 1;
  }
}

.home-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.home-category-card,
.home-master-card,
.home-article-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid rgba(124, 92, 255, .24);
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  background: rgba(12, 10, 22, .56);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.home-category-card {
  min-height: 150px;
  padding: 15px;
}

.home-category-card:hover,
.home-master-card:hover,
.home-article-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 232, 242, .42);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .22);
}

.home-category-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  font-family: var(--public-font-heading);
  font-size: 14px;
  background: linear-gradient(135deg, #35e8f5, #8f79f3 55%, #ff4fb4);
  box-shadow: 0 0 18px rgba(99, 232, 242, .2);
}

.home-category-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.home-category-card strong {
  font-family: var(--public-font-heading);
  font-size: 15px;
  line-height: 1.2;
}

.home-category-card span:last-child {
  color: #bfb7d9;
  font-size: 12px;
  line-height: 1.38;
}

.home-request,
.home-contest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px) auto;
  gap: 20px;
  align-items: center;
  padding: clamp(22px, 2.7vw, 34px);
}

.home-request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-request-grid span,
.home-contest-prize {
  padding: 13px 14px;
  border: 1px solid rgba(99, 232, 242, .18);
  border-radius: 12px;
  color: #d8d1f0;
  background: rgba(8, 9, 17, .42);
  font-size: 13px;
  font-weight: 800;
}

.home-master-grid,
.home-article-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-master-card {
  padding: 16px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
}

.home-master-avatar {
  grid-row: span 4;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #fff;
  font-family: var(--public-font-heading);
  background: linear-gradient(135deg, #35e8f5, #8f79f3 55%, #ff4fb4);
}

.home-master-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--public-font-heading);
  font-size: 17px;
}

.home-master-card span,
.home-master-card em,
.home-article-card span {
  color: #bfb7d9;
  font-size: 12px;
  line-height: 1.38;
  font-style: normal;
}

.home-master-card em {
  color: #63e8f2;
  font-weight: 850;
}

.home-contest-prize {
  display: grid;
  gap: 4px;
}

.home-contest-prize span {
  color: #bfb7d9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.home-contest-prize strong {
  color: #fff;
  font-family: var(--public-font-heading);
  font-size: 28px;
}

.home-article-card {
  padding: 18px;
}

.home-article-card strong {
  font-family: var(--public-font-heading);
  font-size: 18px;
  line-height: 1.22;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .42s ease, transform .42s ease;
  transition-delay: var(--rd, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-wall-tile.reveal,
.home-wall-tile.reveal.is-visible {
  transform: none;
}

.home-wall-tile.reveal:hover {
  transform: translateY(-3px);
}

@media (max-width: 1180px) {
  .home-hero {
    min-height: 520px;
  }

  .home-categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .home-master-grid,
  .home-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-request,
  .home-contest {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-page {
    padding-inline: 12px;
  }

  .home-hero {
    min-height: 590px;
    aspect-ratio: auto;
  }

  .home-hero-content {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }

  .home-stats,
  .home-request-grid,
  .home-categories,
  .home-master-grid,
  .home-article-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 124px;
  }

  .home-wall-tile.big,
  .home-wall-tile.wide {
    grid-column: span 2;
  }

  .home-wall-tile.tall {
    grid-row: span 1;
  }

  .home-section-head {
    display: grid;
  }
}

@media (max-width: 520px) {
  .home-hero {
    min-height: 640px;
  }

  .home-hero-actions,
  .home-stats,
  .home-request-grid,
  .home-categories,
  .home-master-grid,
  .home-article-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-actions .public-btn,
  .home-request .public-btn,
  .home-contest .public-btn {
    width: 100%;
  }
}
