/* Min Tools home only: the wordmark in the header, the icon trio, the app
   cards with their cropped windows, the repository ledger, and the ways to
   contribute. landing.css supplies everything else. */

/* The min.tools wordmark is the home page's brand: the dark-ink version
   over a light hero, the light-ink version in the dark scheme and inside
   the scrolled capsule, which is dark in both schemes. */
body.landing header.site .brand img {
  width: auto;
  height: 26px;
  border-radius: 0;
}

body.landing header.site .brand img.dark,
html:not(.js) body.landing header.site .brand img.light,
body.landing header.site.scrolled .brand img.light {
  display: none;
}

html:not(.js) body.landing header.site .brand img.dark,
body.landing header.site.scrolled .brand img.dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  body.landing header.site .brand img.light {
    display: none;
  }

  body.landing header.site .brand img.dark {
    display: block;
  }
}

/* Three app icons above the hero glow. */
.trio {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 44px);
  margin: clamp(28px, 5vw, 48px) auto 0;
  padding: 0 24px;
  list-style: none;
}

.trio li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Keep each linked icon and its label together. */
.trio a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  text-decoration: none;
}

.trio a:hover {
  text-decoration: none;
}

.trio img {
  width: clamp(60px, 10vw, 110px);
  height: clamp(60px, 10vw, 110px);
  border-radius: 22.5%;
  box-shadow: 0 24px 50px -18px rgba(10, 100, 255, 0.55), 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}

.trio b {
  font-size: 16px;
  font-weight: 600;
}

.trio span {
  margin-top: -8px;
  font-size: 13px;
  color: var(--muted);
}

/* The app shelf: one card per app with a cropped window on top. */
.apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.app-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Clip each app preview to a shallow desktop window at the card width. */
.shot {
  position: relative;
  height: 15em;
  padding: 1.6em 1.4em 0;
  overflow: hidden;
  font-size: clamp(7.5px, 2.2cqw, 10px);
  container-type: inline-size;
  background: var(--desk-bg);
}

/* Fade the clipped bottom edge into the surrounding desktop. */
.shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3em;
  background: linear-gradient(to bottom, transparent, var(--desk-fade));
  pointer-events: none;
}

.shot .win {
  font-size: clamp(7.5px, 2.4cqw, 10.5px);
  height: auto;
  min-height: 100%;
  border-radius: 1em 1em 0 0;
  border-bottom: 0;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}

/* Each card shows the top of one window with just enough inside it: the
   Pastemin list without its detail pane, and the Netmin report without its
   sidebar. */
.shot .pm-body,
.shot .nm-body {
  grid-template-columns: 1fr;
  min-height: 12em;
}

.shot .pm-detail,
.shot .nm-side,
.shot .nm-head .status,
.shot .nm-head .seg {
  display: none;
}

.shot .pm-list {
  border-right: 0;
}

/* The shelf crops a compact Netmin report with room for both metrics. */
.shot .nm-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shot .launcher {
  padding: 1em;
}

.shot .splitview.short {
  height: 12em;
}

/* Keep each app icon aligned with its name and short description. */
.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 0;
}

.app-head img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 8px 20px -10px rgba(10, 100, 255, 0.6);
}

.app-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.app-head p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.app-card>p {
  margin: 14px 22px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Wrap compact feature badges without stretching the card. */
.bits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 22px 0;
  padding: 0;
  list-style: none;
}

.bits li {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Align card actions at the bottom even when descriptions differ in length. */
.app-card .links {
  display: flex;
  gap: 10px;
  margin: auto 22px 0;
  padding: 20px 0 22px;
}

.cta.small {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 15px;
}

/* Stack complete cards when three readable previews no longer fit. */
@media (max-width: 1120px) {
  .apps {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 0 auto;
  }
}

/* The repository list in the source section reuses the ledger, with a
   monospace repository name. */
.ledger .row .t code {
  font: 600 0.95em var(--mono);
  color: var(--win-fg);
}

/* Ways to contribute: four compact cards between the lead and the button. */
.ways {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 28px;
  text-align: left;
}

.ways .edge {
  padding: 18px 18px 20px;
}

.ways .edge h3 {
  margin-top: 12px;
  font-size: 16px;
}

.ways .edge p {
  font-size: 14px;
}

/* Keep contribution cards readable as the available width narrows. */
@media (max-width: 960px) {
  .ways {
    grid-template-columns: 1fr 1fr;
  }
}

/* Give each contribution card the full width on small phones. */
@media (max-width: 560px) {
  .ways {
    grid-template-columns: 1fr;
  }
}

/* Hide secondary navigation links on narrow screens. */
@media (max-width: 760px) {
  body.landing header.site nav a[href="#source"],
  body.landing header.site nav a[href="#contribute"] {
    display: none;
  }
}
