/* roman-dev.com's home page, on top of the shared Discord theme (/discord.css): the sites as cards, like Discord's
   server discovery */

.home {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 50% -120px, #5865f22e, transparent 70%),
    var(--app-frame-background);
}

.home-bar {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
}

.home-main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 48px;
}

.hero {
  text-align: center;
  margin-bottom: 36px;
}

.hero h1 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.hero p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 16px;
}

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

.site {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--background-base-lower);
  color: var(--text-default);
  overflow: hidden;
  transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out, background-color .2s ease-out;
}

.site:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: var(--border-normal);
  background: var(--background-base-low);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .32);
}

.site:focus-visible {
  outline-offset: 4px;
}

.site-banner {
  height: 168px;
  flex: none;
  background: var(--background-surface-high);
}

.mod-banner {
  background: url("/moderation/banner.jpg") center / cover no-repeat, #8ec5fb;
}

/* (the UGC banner is drawn here: a tilted wall of item tiles on Discord's blurple) */
.ugc-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #5865f2 0%, #7a4fe0 55%, #eb459e 120%);
}

.tiles {
  position: absolute;
  inset: -40px -20px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  transform: rotate(-8deg);
}

.tiles i {
  aspect-ratio: 1;
  border-radius: 14px;
  background: #ffffff1f;
  box-shadow: inset 0 0 0 1px #ffffff26;
}

.tiles i:nth-child(3n) {
  background: #ffffff33;
}

.tiles i:nth-child(4n + 1) {
  background: #23a55a66;
}

.tiles i:nth-child(7) {
  background: #f23f4366;
}

.site-icon {
  position: absolute;
  top: 132px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 6px solid var(--background-base-lower);
  border-radius: 20px;
  color: #fff;
  transition: border-color .2s ease-out;
}

.site:hover .site-icon {
  border-color: var(--background-base-low);
}

.site-icon .icon {
  width: 26px;
  height: 26px;
}

.ugc-icon {
  background: var(--brand);
}

.mod-icon {
  background: #248046;
}

.site-body {
  flex: 1;
  padding: 44px 20px 8px;
}

.site-body h2 {
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
}

.site-body p {
  margin: 8px 0 0;
  color: var(--text-subtle);
  font-size: 15px;
  line-height: 21px;
}

.site-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--background-mod-normal);
  color: var(--text-subtle);
  font-size: 13px;
  font-weight: 600;
}

.pill .icon {
  width: 14px;
  height: 14px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.dot.online {
  background: var(--status-online);
}

.site-stat b {
  color: var(--text-strong);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.site-button {
  margin: 16px 20px 20px;
}

.home-foot {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .home-main {
    padding: 16px 16px 32px;
  }

  .hero {
    margin-bottom: 24px;
  }

  .hero h1 {
    font-size: 24px;
    line-height: 30px;
  }

  .sites {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .site-banner {
    height: 128px;
  }

  .site-icon {
    top: 92px;
  }
}
