/* Home-only animations / overrides */

/* We animate elements, not whole sections */
.page-home .section-block {
  animation: none !important;
}

.page-home .hxr {
  opacity: 0.001;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 720ms cubic-bezier(0.2, 0.72, 0.12, 1),
    transform 840ms cubic-bezier(0.16, 0.84, 0.14, 1);
  transition-delay: var(--hxr-delay, 0ms);
  will-change: opacity, transform;
}

.page-home .hxr--up {
  transform: translate3d(0, 22px, 0);
}

.page-home .hxr--down {
  transform: translate3d(0, -18px, 0);
}

.page-home .hxr--left {
  transform: translate3d(24px, 0, 0);
}

.page-home .hxr--right {
  transform: translate3d(-24px, 0, 0);
}

.page-home .hxr.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Keep hero stage / fixed elements stable */
.page-home .hmr-stage,
.page-home .hm-content-stage,
.page-home .hm-stage-pillar {
  will-change: auto;
}

@media (max-width: 760px) {
  .page-home .hxr--up,
  .page-home .hxr--down {
    transform: translate3d(0, 14px, 0);
  }

  .page-home .hxr--left,
  .page-home .hxr--right {
    transform: translate3d(0, 14px, 0);
  }

  .page-home .hxr {
    transition-duration: 620ms, 700ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hxr,
  .page-home .hxr.is-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
}

/* Join section hover smoothing (avoid layout shift from padding animation) */
.page-home .hm-section-join .hm-entry {
  padding-left: 0.15rem;
  transition:
    background-color 220ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 220ms ease;
  will-change: transform;
}

.page-home .hm-section-join .hm-entry:hover {
  padding-left: 0.15rem;
  transform: translate3d(6px, 0, 0);
  background: rgba(255, 255, 255, 0.5);
}

.page-home .hm-section-join .hm-entry-arrow {
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 180ms ease;
}

.page-home .hm-section-join .hm-entry:hover .hm-entry-arrow {
  transform: translate3d(3px, 0, 0);
  color: #ff076c;
}

@media (max-width: 760px) {
  .page-home .hm-section-join .hm-entry:hover {
    transform: translate3d(3px, 0, 0);
  }
}

/* Home mobile polish (layout + readability) */
@media (max-width: 860px) {
  body.page-home::after {
    top: 6.15rem !important;
  }

  .page-home .main-content {
    padding-top: 0.95rem !important;
  }

  .page-home .hm-hero--refined-motion {
    min-height: calc(100svh - 7.35rem) !important;
    padding-top: 0.35rem !important;
  }

  .page-home .hmr-shell {
    padding-top: 0.65rem !important;
    padding-bottom: 0.35rem !important;
  }

  .page-home .hmr-copy {
    padding-top: 0.25rem !important;
  }

  .page-home .hmr-metrics {
    gap: 0.58rem 0.65rem !important;
  }

  .page-home .hmr-footnav {
    grid-template-columns: repeat(2, minmax(0, max-content));
    column-gap: 0.95rem;
    row-gap: 0.34rem;
    align-items: start;
  }

  .page-home .hmr-footnav a {
    font-size: 0.72rem !important;
  }

  .page-home .hmr-footnav a:last-child {
    grid-column: 1 / -1;
  }

  .page-home .hm-section {
    margin-top: 1.1rem;
  }

  .page-home .hm-section-head {
    margin-bottom: 0.65rem;
  }

  .page-home .hm-section .hm-note-text {
    max-width: none;
    font-size: 0.93rem;
    line-height: 1.54;
  }

  .page-home .hm-event-row {
    gap: 0.28rem;
    padding: 0.82rem 0;
  }

  .page-home .hm-weekly-list {
    margin-top: 0.65rem;
    gap: 0.45rem;
  }

  .page-home .hm-weekly-row {
    padding: 0.3rem 0;
  }

  .page-home .hm-discord-banner {
    gap: 0.75rem;
  }

  .page-home .hm-discord-visual {
    min-height: 148px;
  }
}

@media (max-width: 560px) {
  body.page-home::after {
    top: 5.85rem !important;
    left: 0.45rem !important;
    right: 0.45rem !important;
    bottom: 0.45rem !important;
  }

  .page-home .hm-hero--refined-motion {
    min-height: calc(100svh - 7rem) !important;
  }

  .page-home .hmr-copy-top {
    margin-bottom: 0.35rem !important;
  }

  .page-home .hmr-title {
    line-height: 0.9;
  }

  .page-home .hmr-strap {
    margin-top: 0.95rem !important;
    line-height: 1.12;
  }

  .page-home .hmr-metric-value {
    font-size: clamp(1.02rem, 5.2vw, 1.34rem) !important;
  }

  .page-home .hmr-metric:nth-child(3) .hmr-metric-value {
    white-space: normal;
    word-break: break-word;
    line-height: 0.95;
  }

  .page-home .hmr-footnav {
    grid-template-columns: 1fr;
    gap: 0.28rem;
  }

  .page-home .hmr-footnav a:last-child {
    grid-column: auto;
  }

  .page-home .hm-section .hm-note-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .page-home .hm-entry {
    gap: 0.65rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .page-home .hm-entry-copy h3 {
    font-size: 0.98rem;
  }

  .page-home .hm-entry-copy p {
    font-size: 0.84rem;
    line-height: 1.42;
  }

  .page-home .hm-event-row h3 {
    font-size: 0.98rem;
  }

  .page-home .hm-event-row p:last-child {
    font-size: 0.86rem;
    line-height: 1.42;
  }

  .page-home .hm-weekly-row {
    gap: 0.15rem;
    font-size: 0.85rem;
  }

  .page-home .hm-discord-banner {
    padding: 0.72rem;
  }

  .page-home .hm-discord-copy h2 {
    max-width: none;
    font-size: clamp(1.12rem, 7vw, 1.45rem);
    line-height: 1.08;
  }

  .page-home .hm-discord-meta {
    font-size: 0.78rem;
    line-height: 1.34;
  }

  .page-home .hm-discord-visual {
    min-height: 132px;
  }

  .page-home .hm-discord-logo-shell img {
    width: min(88%, 210px);
  }
}

@media (max-width: 420px) {
  .page-home .hmr-metrics {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .page-home .hmr-metric:nth-child(3) {
    grid-column: auto;
  }

  .page-home .hmr-metric {
    padding-top: 0.36rem;
  }

  .page-home .hmr-footnav a {
    font-size: 0.68rem !important;
    letter-spacing: 0.06em;
  }
}
