/* Society-Network — public homepage */

.page-home {
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(139, 0, 0, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255, 42, 42, 0.06) 0%, transparent 50%),
    var(--bg);
}

.page-main--home {
  padding: 1.5rem 0 3rem;
}

.page-home .site-brand__logo--network,
.page-home .about-discord__logo {
  filter: drop-shadow(0 2px 12px rgba(255, 42, 42, 0.28));
}

/* Header — desktop: one centered row; small phones: stacked */
.page-home .site-header--public .site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  padding: 0.65rem 0;
}

.page-home .site-header--public .site-brand {
  justify-content: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.page-home .site-header--public .site-header__actions {
  flex: 0 0 auto;
  justify-content: center;
  margin-left: 0;
  gap: 0.65rem 0.85rem;
}

/* Hide duplicate title on small screens (wordmark is in the logo PNG) */
.page-home .site-header--public .site-brand:has(.site-brand__logo--network) .site-brand__name {
  display: none;
}

.page-home .site-header--public .site-brand > .site-brand__logo--network {
  height: var(--logo-network-h-header);
  width: auto;
  max-width: min(36vw, var(--logo-network-w-header));
  min-width: 0;
  margin-inline: 0;
  filter: drop-shadow(0 2px 14px rgba(255, 42, 42, 0.35));
}

.site-nav__link.is-active {
  color: var(--text);
  border-bottom: 1px solid rgba(255, 42, 42, 0.55);
}

.page-home .site-header--public .site-nav__link {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.35rem;
}

.btn--nav {
  min-height: 42px;
  padding: 0.55rem 1.15rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

@media (min-width: 768px) {
  .page-home .site-header--public .site-header__inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0;
    gap: 1.25rem 1.75rem;
  }

  .page-home .site-header--public .site-brand {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
  }

  .page-home .site-header--public .site-brand:has(.site-brand__logo--network) .site-brand__name {
    display: block;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
    white-space: nowrap;
    text-shadow: 0 0 14px rgba(255, 42, 42, 0.2);
  }

  .page-home .site-header--public .site-brand > .site-brand__logo--network {
    height: var(--logo-network-h-header);
    max-width: min(12.5rem, 22vw);
    margin-inline: 0;
    flex-shrink: 0;
  }

  .page-home .site-header--public .site-header__actions {
    flex-shrink: 0;
  }

  .page-home .site-header--public .site-nav__link {
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  .page-home .site-header--public .site-header__inner {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-align: center;
  }

  .page-home .site-header--public .site-brand {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
    justify-content: center;
  }

  .page-home .site-header--public .site-header__actions {
    flex: 1 1 100%;
    justify-content: center;
    width: 100%;
    margin-left: 0;
  }
}

/* Alert */
.home-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #fecaca;
  background: rgba(139, 0, 0, 0.25);
  border: 1px solid rgba(255, 42, 42, 0.4);
  border-radius: var(--radius);
}

.home-alert:not([hidden]) {
  display: block;
}

/* Hero */
.home-hero {
  position: relative;
  text-align: center;
  padding: 2.25rem 1.25rem 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(14, 14, 14, 0.98) 100%);
  box-shadow: var(--glow-soft);
  overflow: hidden;
  animation: home-fade-in 0.6s ease-out;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 42, 42, 0.02) 2px,
    rgba(255, 42, 42, 0.02) 4px
  );
  pointer-events: none;
  opacity: 0.6;
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

.home-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-hero__label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red);
  animation: home-pulse-dot 2.5s ease-in-out infinite;
}

.home-hero__brand {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  padding: 0.25rem 0 0.75rem;
  overflow: visible;
  flex-shrink: 0;
}

.page-home .home-hero__logo {
  display: block;
  width: auto;
  height: var(--logo-network-h-hero);
  max-width: var(--logo-network-w-hero-max);
  min-height: 5rem;
  margin-inline: auto;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 4px 24px rgba(255, 42, 42, 0.22));
}

@media (min-width: 768px) {
  .page-home .home-hero__logo {
    height: var(--logo-network-h-hero-lg);
    min-height: 7rem;
    max-width: min(92vw, 48rem);
  }
}

.home-hero__tagline--lead {
  margin: 0 0 1rem;
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e5e5;
}

.home-hero__tagline {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e5e5e5;
}

.home-hero__lead {
  margin: 0 auto 1.75rem;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.home-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.btn--lg {
  min-width: min(100%, 280px);
  min-height: 48px;
  padding: 0.75rem 1.5rem;
}

@media (min-width: 600px) {
  .home-hero {
    padding: 2.75rem 2rem 3rem;
  }

  .home-hero__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn--lg {
    min-width: 220px;
    width: auto;
  }
}

/* About */
.home-about {
  padding: 1.75rem 1.5rem;
  animation: home-fade-in 0.7s ease-out 0.1s both;
}

.section-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 42, 42, 0.85);
}

.home-about__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 42, 42, 0.15);
  text-align: center;
}

.home-about__header .section__title {
  margin: 0;
  font-size: 1.15rem;
}

.home-about__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  text-align: center;
}

.home-about__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.page-home .home-about .about-discord__logo {
  width: min(72vw, var(--logo-discord-md));
  height: min(72vw, var(--logo-discord-md));
  padding: 0.5rem;
  border-width: 2px;
  box-shadow: 0 0 20px rgba(255, 42, 42, 0.22);
}

.home-about__copy {
  width: 100%;
  max-width: 40rem;
}

.home-about__copy .section__text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
}

.home-about__banner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 42, 42, 0.15);
  width: 100%;
}

.home-about__banner-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 0.5rem;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 0 28px rgba(255, 42, 42, 0.18);
}

@media (min-width: 768px) {
  .home-about {
    padding: 2rem 2.25rem;
  }

  .home-about__body {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    text-align: left;
  }

  .home-about__visual {
    width: auto;
    max-width: 40%;
  }

  .home-about__copy {
    flex: 1;
    max-width: none;
  }

  .home-about__copy .section__text {
    text-align: left;
  }

  .page-home .home-about .about-discord__logo {
    width: var(--logo-discord-lg);
    height: var(--logo-discord-lg);
  }
}

/* Footer */
.site-footer--home {
  margin-top: 2rem;
  padding: 1.75rem 0 2rem;
  border-top: 1px solid rgba(255, 42, 42, 0.22);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.site-footer--home .site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

.site-footer__name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__tag {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 22rem;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(163, 163, 163, 0.85);
  letter-spacing: 0.04em;
}

@keyframes home-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero,
  .home-about {
    animation: none;
  }

  .home-hero__label-dot {
    animation: none;
  }
}
