/* -------------------------------------------------------------------------
 * site.css — hyperup.link tweaks layered on top of Hyperuplink's own CSS.
 *
 * Everything here is website chrome only. The reset / theme / layout /
 * colorscheme / hyperuplink stylesheets are copied verbatim from the board and
 * must not be edited here — run `make assets` to refresh them.
 * ------------------------------------------------------------------------- */

/* Open the menubar dropdowns on hover, not only on keyboard focus, so the site
 * menu behaves the way visitors expect while staying 100% JavaScript-free. */
[role="menubar"] > li:hover > [role="menu"],
[role="menu"] li:hover > [role="menu"] {
  display: block;
}

.menubar .cta {
  white-space: nowrap;
  margin-left: var(--margin);
}

.menubar .button {
  margin: 2px 4px;
}

/* The ASCII splash on the landing page. */
.ascii-logo {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: var(--margin) auto;
  padding: var(--padding) 0;
  overflow-x: auto;
  font-family: "Gohu", "Courier New", monospace;
  font-size: clamp(6px, 1.8vw, 14px);
  line-height: 1.15;
  color: var(--primary-4);
  text-shadow: 0 0 6px color-mix(in srgb, var(--primary-4), transparent 55%);
  white-space: pre;
}

.hero-copy {
  max-width: 72ch;
  margin: 0 auto;
}

.hero-copy > p:first-of-type {
  font-size: 1.15rem;
}

.cta-row {
  justify-content: center;
  margin: var(--margin) 0 4px 0;
}

.cta-row .button {
  padding: 6px 16px;
}

.button {
  font-family: var(--font-regular);
  font-size: var(--font-size-regular);
}

.post-meta {
  color: var(--disabled-fg);
}

/* Keep wide markdown tables from blowing out the layout on small screens,
 * but let their cells wrap instead of clipping. */
.markdown table {
  display: block;
  overflow-x: auto;
}

/* The board's list cells default to `white-space: nowrap` because forum names
 * are short. The website's feature/post descriptions are long, so let list
 * cells wrap and top-align their icons instead of clipping the text. */
.detailed td {
  white-space: normal;
}

.detailed .icon {
  align-items: flex-start;
}

.detailed .icon > img {
  margin-top: 2px;
}

.detailed .icon > .icon-label {
  text-align: left;
}

.icon-sublabel {
  white-space: normal;
}

/* The "Take a Look Around" screenshot tour on the landing page: a responsive
 * grid of captioned screenshots, each framed with the same sunken inset the
 * board uses elsewhere so it sits at home in the retro chrome. */
.screenshot-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.screenshot {
  display: flex;
  flex-direction: column;
}

.screenshot-image {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface-13);
  box-shadow:
    0 0 0 1px var(--border-brightness-00),
    inset 1px 1px var(--border-brightness-06),
    inset -1px -1px var(--border-brightness-15);
}

.screenshot-caption {
  padding: var(--padding) 2px 0 2px;
}

.screenshot-title {
  font-size: 1.05rem;
}

.screenshot-desc {
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--surface-05);
}

@media (max-width: 600px) {
  .banner img {
    height: auto;
  }
}
