/* Quiet's landing page: the opening beside a board, the games, then the
   community beside "Make your own game". */

.q-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* The opening. */
/* Two columns from 960px; under it the drawing goes below, smaller. */
.q-hero-in {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 460px);
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 64px;
}

.q-hero-copy {
  min-width: 0;
}

.q-hero-art {
  width: 100%;
  min-width: 0;
  aspect-ratio: 520 / 628;
  background: url("assets/hero-board.svg") center / contain no-repeat;
}

[data-mode="dark"] .q-hero-art {
  background-image: url("assets/hero-board-dark.svg");
}

.q-hero [data-part="hero"] {
  max-width: none;
  margin: 0;
  padding: 0;
}

.q-hero [data-part="hero-texture"] {
  display: none;
}

.q-hero [data-part="hero-title"] {
  margin: 0 0 20px;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: rgb(var(--c-heading));
}

.q-hero [data-part="hero-title"] span {
  color: inherit;
}

.q-hero [data-part="hero-text"] {
  margin: 0 0 32px;
  max-width: 30em;
  font-size: 19px;
  line-height: 1.55;
  color: rgb(var(--c-secondary));
}

.q-hero [data-part="hero-actions"] {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  gap: 12px;
}

.q-hero [data-part="hero-action"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
}

.q-hero [data-part="hero-action"][data-variant="primary"] {
  background: rgb(var(--c-accent));
  color: rgb(var(--c-on-accent));
}

.q-hero [data-part="hero-action"][data-variant="primary"]:hover {
  background: rgb(var(--c-accent-hover));
}

.q-hero [data-part="hero-action"][data-variant="primary"]::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("assets/icon-play.svg") center / contain no-repeat;
  mask: url("assets/icon-play.svg") center / contain no-repeat;
}

.q-hero [data-part="hero-action"][data-variant="secondary"] {
  border: 1px solid rgb(var(--c-edge));
  background: rgb(var(--c-surface));
  color: rgb(var(--c-primary));
}

.q-hero [data-part="hero-action"][data-variant="secondary"]:hover {
  background: rgb(var(--c-surface-muted));
}

/* The games. */
.q-games {
  background: rgb(var(--c-surface));
  border-top: 1px solid rgb(var(--c-edge-light));
  border-bottom: 1px solid rgb(var(--c-edge-light));
}

.q-games > .q-wrap {
  padding-top: 56px;
  padding-bottom: 64px;
}

.q-wrap [data-part="section"] {
  max-width: none;
  margin: 0;
  padding: 0;
}

.q-wrap [data-part="section-head"] {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}

.q-wrap [data-part="section-title"] {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgb(var(--c-heading));
}

.q-wrap [data-part="section-text"] {
  margin-top: 4px;
  font-size: 15px;
  color: rgb(var(--c-muted));
}

.q-wrap [data-part="section-link"] {
  font-size: 15px;
  font-weight: 600;
  color: rgb(var(--c-accent));
}

.q-games [data-part="card-grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}

.q-games [data-part="card"] {
  display: block;
  padding: 16px;
}

.q-games [data-part="card-title"] {
  font-size: 17px;
  font-weight: 600;
  color: rgb(var(--c-heading));
}

.q-games [data-part="card"]:hover [data-part="card-title"] {
  color: rgb(var(--c-heading));
}

.q-games [data-part="card-text"] {
  margin-top: 4px;
  font-size: 14px;
  color: rgb(var(--c-secondary));
}

.q-games [data-part="card-meta"] {
  margin-top: 8px;
  font-size: 13px;
  color: rgb(var(--c-muted));
}

/* The community, as a list, beside "Make your own game". */
/* The landing's sections run to the footer: the frame's bottom padding goes
   (its top is cancelled by the page's wrapper). */
.q-main > div:has(.q-hero) {
  padding-bottom: 0;
}

.q-more-in {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.q-community {
  flex: 1 1 520px;
  min-width: 0;
}

.q-community [data-part="post-list"] {
  display: block;
  border-top: 1px solid rgb(var(--c-edge-light));
}

.q-community [data-part="post"] {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid rgb(var(--c-edge-light));
  border-radius: 0;
  background: transparent;
}

.q-community [data-part="post-head"] {
  grid-row: span 3;
  margin: 0;
}

.q-community [data-part="post-type"] {
  padding: 0;
  background: transparent;
  color: rgb(var(--c-secondary));
  font-size: 13px;
  font-weight: 600;
}

.q-community [data-part="post-title"] {
  font-size: 16px;
  font-weight: 600;
  color: rgb(var(--c-heading));
}

.q-community [data-part="post-excerpt"] {
  display: none;
}

.q-community [data-part="post-meta"] {
  margin-top: 0;
  font-size: 14px;
  color: rgb(var(--c-muted));
}

.q-make {
  flex: 1 1 360px;
  min-width: 0;
  align-self: flex-start;
  padding: 28px;
  background: rgb(var(--c-surface));
  border: 1px solid rgb(var(--c-edge-light));
  border-radius: 8px;
}

.q-make-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgb(var(--c-heading));
}

.q-make-title::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("assets/icon-code.svg") center / contain no-repeat;
  mask: url("assets/icon-code.svg") center / contain no-repeat;
}

.q-make-text {
  margin: 12px 0 20px;
  color: rgb(var(--c-secondary));
}

.q-make-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.q-button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid rgb(var(--c-edge));
  background: rgb(var(--c-surface));
  color: rgb(var(--c-primary));
  font-size: 15px;
  font-weight: 600;
}

.q-button:hover {
  background: rgb(var(--c-surface-muted));
}

.q-button-quiet {
  border-color: transparent;
  background: transparent;
}

@media (max-width: 959px) {
  .q-hero-in {
    grid-template-columns: minmax(0, 1fr);
  }

  .q-hero-art {
    max-width: 360px;
  }
}

@media (max-width: 639px) {
  .q-wrap {
    padding: 0 16px;
  }

  .q-hero-in {
    padding-top: 40px;
    padding-bottom: 40px;
    gap: 40px;
  }

  .q-hero [data-part="hero-title"] {
    font-size: 38px;
  }

  .q-hero [data-part="hero-text"] {
    font-size: 17px;
  }
}
