/*
 * The landing page: a short description and a card per page.
 *
 * Layered on walkthrough.css, which is the shared document-page sheet the
 * essays all use. That is where `body.doc` and `main.doc-body` undo the app's
 * layout — style.css makes `body` a flex column and `main` a three-column grid
 * sized for the workspace, and a scrolling page has to opt out of both. Loading
 * only style.css and landing.css put the hero card in the 322px side column and
 * spilled the grid off the page; the fix was to stop reinventing the reset that
 * already existed here.
 *
 * So this file only widens the column and styles the cards. Rules are scoped
 * under .landing-main, because .doc-body already claims plain `a` and `p` and
 * would otherwise recolor the cards' text.
 */

.doc-body.landing-main {
  max-width: 980px;
  padding: 26px 22px 72px;
}

/* no nav bar here, so the theme toggle needs a home of its own */
.theme-corner {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 40;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}
.theme-corner:hover { border-color: var(--accent); }

/* ------------------------------------------------------------------ hero */

.landing-hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.landing-hero h1::before { content: "✦"; color: var(--accent); margin-right: 10px; }

.landing-hero .tagline {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--dim);
  margin: 0 0 18px;
  max-width: 62ch;
  line-height: 1.5;
}
.landing-hero p { max-width: 68ch; }
.landing-hero .byline { color: var(--dim); font-size: 14px; }

/* the app gets a wide card of its own, above the grid */
.landing-main .hero-card {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 26px 0 36px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.landing-main .hero-card:hover { border-color: var(--accent); transform: translateY(-1px); }
/* 16:10, the aspect the thumbnails are rendered at — a square box would
   letterbox them and the render's background is not quite the card's */
.landing-main .hero-card img {
  width: 208px; height: 130px; flex: none;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
}
.landing-main .hero-card h2 { margin: 0 0 8px; font-size: 21px; }
.landing-main .hero-card p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.5; }
.landing-main .hero-card .go { color: var(--accent); font-weight: 600; white-space: nowrap; flex: none; }

/* ----------------------------------------------------------------- cards */

.landing-main h2.section {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--dim);
  font-weight: 600;
  margin: 34px 0 14px;
  padding: 0;
  border: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.landing-main .card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.landing-main .card:hover { border-color: var(--accent); transform: translateY(-2px); }
.landing-main .card .thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
/* the rendered solids are transparent PNGs and want breathing room, not a crop */
.landing-main .card .thumb.contain { object-fit: contain; padding: 10px; }
.landing-main .card .body { padding: 12px 14px 15px; }
.landing-main .card h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 620; line-height: 1.3; }
.landing-main .card p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--dim); }

/* ---------------------------------------------------------------- footer */

.landing-foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.6;
}
.landing-foot p { margin: 0 0 10px; }

@media (max-width: 560px) {
  .landing-main .hero-card { flex-direction: column; align-items: flex-start; }
  .landing-main .hero-card img { width: 100%; height: 170px; }
}
