/* The homepage: each section is a window like the mod's screens, its heading in
   the title bar and its content on the darker panel inside. Builds on /site.css. */

.home { max-width: 1200px; margin: 0 auto; display: grid; gap: 16px; }
.home .window { width: 100%; }
.window > .titlebar { margin: 0; }
.pane { background: var(--panel-dark); padding: 24px; }
.hero { padding-top: 16px; }

/* ---------- hero: the name and pitch beside the big picture */
.hero .pane { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; padding: 32px; }
.hero h1 { font-size: 52px; margin: 0; }
.tagline { margin: 6px 0 18px; font-size: 21px; color: var(--muted); }
.lede { max-width: 58ch; font-size: 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.cta a { height: 48px; padding: 0 20px; font-size: 18px; }

/* A framed 16:9 picture. The text under the image shows if the file is missing. */
.media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; margin: 0; color: var(--dim); font-size: 15px; }
.media img { position: absolute; inset: 0; height: 100%; object-fit: cover; }

/* ---------- features: picture and text, swapping sides, no boxes */
.features { display: grid; gap: 32px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.feature:nth-child(even) .media { order: 2; }
.feature h3 { margin: 0 0 10px; font-size: 22px; }
.feature p:last-child { margin-bottom: 0; }

/* ---------- devlogs: thumbnails in frames; the player replaces one on play */
.devlogs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.devlog .yt, .devlog iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 2px solid var(--border); background: var(--row); }
.devlog .yt { position: relative; padding: 0; cursor: pointer; }
.devlog .yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The play button: a square like the mod's green buttons, with a white triangle. */
.devlog .yt span {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; transform: translate(-50%, -50%);
  background: var(--green); border: 2px solid var(--accent);
}
.devlog .yt:hover span { background: var(--green-hover); }
.devlog .yt span::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
  border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff;
}
.devlog h3 { margin: 10px 0 0; font: 17px/1.4 var(--plain); }
.more { margin: 18px 0 0; }

/* ---------- new here */
.start { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0; }
.start p { flex: 1 1 320px; }

/* ---------- download */
.badges { display: flex; flex-wrap: wrap; gap: 20px; }
.badges a { display: block; line-height: 0; }
.badges img { width: auto; height: 64px; }
.beta { margin-top: 24px; padding-top: 20px; border-top: 2px solid var(--rule); }
.beta h3 { margin: 0 0 6px; }
.beta p { color: var(--muted); }
.beta-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.reqs { margin: 22px 0 0; font-size: 15px; color: var(--muted); }
.install-link { margin: 6px 0 0; }

/* ---------- more TownTopia: rows like the site bar's buttons */
.links { display: grid; gap: 8px; }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 12px 16px;
  background: var(--row); border: 2px solid var(--border); color: var(--text); text-decoration: none;
}
.link-row:hover { background: var(--row-hover); border-color: var(--border-hover); color: var(--text); }
.link-row h3 { margin: 0 0 2px; }
.link-row p { margin: 0; color: var(--muted); }
.link-row .go { color: var(--link); }

@media (max-width: 860px) {
  .home { gap: 8px; }
  .hero { padding-top: 8px; }
  .pane, .hero .pane { padding: 16px 12px; }
  .hero .pane { grid-template-columns: 1fr; gap: 20px; }
  .hero h1 { font-size: 40px; }
  .feature { grid-template-columns: 1fr; gap: 12px; }
  .feature:nth-child(even) .media { order: 0; }
  .devlogs { grid-template-columns: 1fr; }
}
