/* The front page (/, views/landing.js): the explorer's own chrome steps aside; the game's models are the picture. */
body.is-landing .topbar, body.is-landing .sidenav, body.is-landing .scrim { display: none; }
body.is-landing main { margin: 0; padding: 0; max-width: none; }
body.is-landing main > :not(#landingview):not(.gsearch) { display: none; }

.landing { --wrap: 1360px; --pad: clamp(16px, 4vw, 48px);
  /* the cutting mat the models sit on: a fine grid, a coarser one every fourth line */
  --mat: linear-gradient(rgba(196, 181, 253, .075) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(90deg, rgba(196, 181, 253, .075) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(rgba(196, 181, 253, .035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(196, 181, 253, .035) 1px, transparent 1px) 0 0 / 24px 24px, #0f0d17;
  display: block; }
.ld-main { min-width: 0; max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.landing a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-1); }

/* ── the bar along the top: the brand, the pages, the profile; see-through until the page scrolls under it ── */
.ld-top { position: sticky; top: 0; z-index: var(--z-topbar); border-bottom: 1px solid transparent; transition: background var(--d-2), border-color var(--d-2), backdrop-filter var(--d-2); }
.ld-top.scrolled { background: rgba(10, 10, 15, .78); border-bottom-color: var(--line); backdrop-filter: blur(14px) saturate(1.2); }
.ld-top-in { display: flex; align-items: center; gap: 36px; max-width: calc(var(--wrap) + 2 * var(--pad)); height: 72px; margin: 0 auto; padding: 0 var(--pad); }
.ld-links { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ld-links a { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); color: var(--muted); font: 600 14.5px/1 'Manrope', sans-serif; text-decoration: none; white-space: nowrap; transition: color var(--d-1), background var(--d-1); }
.ld-links a:hover { color: var(--white); background: var(--hover); }
.ld-links a[aria-current] { color: var(--white); }
/* the page shown: a short bar of the brand's violet under it */
.ld-links a[aria-current]::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: var(--purple); }
.ld-links .ld-ext svg { width: 13px; height: 13px; color: var(--faint); transition: color var(--d-1), transform var(--d-1); }
.ld-links .ld-ext:hover svg { color: var(--lilac); transform: translate(1px, -1px); }
.ld-links-sep { width: 1px; height: 18px; margin: 0 8px; background: var(--line-2); }
.ld-top-end { margin-left: auto; }
.ld-brand { flex: none; display: flex; align-items: center; gap: 10px; color: var(--white); font: 700 17px/1 'Outfit', sans-serif; text-decoration: none; }
.ld-brand .logo { font: 800 24px/1 'Outfit', sans-serif; letter-spacing: -.04em; }
.ld-brand .logo i { font-style: normal; color: var(--purple); }
.ld-open { display: inline-flex; align-items: center; height: var(--h-md); padding: 0 18px; border-radius: var(--r-pill); background: var(--violet); color: var(--white); font: 700 14.5px/1 'Manrope', sans-serif; text-decoration: none; transition: background var(--d-2) var(--ease); }
.ld-open:hover { background: #7c3aed; color: var(--white); }

/* ── the hero: the claim and the search on the left, the plate of models on the right ── */
.ld-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; min-height: min(calc(100vh - 72px), 800px); padding: 24px 0 72px; }
.ld-hero-cta { margin-top: 30px; }
.ld-copy h1 { margin: 0; max-width: 12ch; font: 800 clamp(44px, 5.2vw, 84px)/.95 'Outfit', sans-serif; letter-spacing: -.045em; color: var(--white); text-wrap: balance; }
.ld-copy p { max-width: 46ch; margin: 26px 0 30px; font-size: 17.5px; line-height: 1.6; color: var(--muted); }
.ld-search .gsearch { margin: 0; }
.ld-search .gsearch .search { height: 56px; border-color: var(--line-3); background: var(--surface-2); box-shadow: 0 18px 48px rgba(0, 0, 0, .35); }
.ld-search .gsearch .search input { font-size: 16px; }
.ld-search .gresults { width: min(880px, calc(100vw - 2 * var(--pad))); right: auto; }
.ld-quick { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; }
.ld-quick a { color: var(--lilac-2); font-size: 14.5px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 5px; }
.ld-quick a:hover { text-decoration-color: var(--lilac); }

.ld-plate { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: 22px; background: var(--mat); overflow: hidden; }
/* registration marks in the corners, as on a modeller's sheet */
.ld-plate::before, .ld-plate::after { content: ''; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--lilac); opacity: .55; pointer-events: none; }
.ld-plate::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.ld-plate::after { right: 12px; bottom: 12px; border-left: 0; border-top: 0; }
.spec { position: relative; display: block; aspect-ratio: 1; color: inherit; text-decoration: none; border-right: 1px dashed rgba(196, 181, 253, .1); border-bottom: 1px dashed rgba(196, 181, 253, .1); }
.spec:nth-child(4n) { border-right: 0; }
.spec:nth-last-child(-n + 4) { border-bottom: 0; }
.spec img { position: absolute; inset: 4% 2% 15%; width: 96%; height: 81%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); transition: transform var(--d-3) var(--ease); }
.spec code { position: absolute; left: 12px; right: 10px; bottom: 10px; overflow: hidden; font: 500 11px/1.2 'JetBrains Mono', monospace; color: var(--faint); white-space: nowrap; text-overflow: ellipsis; transition: color var(--d-2); }
.spec:hover { background: rgba(196, 181, 253, .045); }
.spec:hover img { transform: translateY(-5px) scale(1.05); }
.spec:hover code { color: var(--lilac); }
/* the page's one entrance: the models laid on the plate, one after another */
@media (prefers-reduced-motion: no-preference) {
  .spec img { animation: ld-lay .6s var(--ease) both; animation-delay: calc(120ms + var(--i) * 55ms); }
  @keyframes ld-lay { from { opacity: 0; transform: translateY(14px) scale(.94); } }
}

/* ── what's inside: one row per group, with a few of its models ── */
.ld-index { padding: 40px 0 24px; }
.ld-index h2, .ld-code h2 { margin: 0 0 18px; font: 800 clamp(30px, 3.4vw, 44px)/1.05 'Outfit', sans-serif; letter-spacing: -.035em; color: var(--white); }
.ld-rows { margin: 0; padding: 0; list-style: none; }
.ld-row { display: grid; grid-template-columns: 250px minmax(0, 1fr) 380px; gap: 32px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line-2); }
.ld-row:last-child { border-bottom: 1px solid var(--line-2); }
.ld-row.no-pics { grid-template-columns: 250px minmax(0, 1fr); }
.ld-row-head { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.ld-row-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-2); background: var(--accent-bg); color: var(--lilac); }
.ld-row-icon svg { width: 22px; height: 22px; }
.ld-row-head b { display: block; font: 700 22px/1.15 'Outfit', sans-serif; letter-spacing: -.02em; color: var(--white); }
.ld-row-head small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.ld-row-head:hover b { color: var(--lilac-2); }
.ld-row-body p { max-width: 54ch; margin: 0 0 10px; font-size: 15.5px; line-height: 1.55; color: var(--text); }
.ld-row-body ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.ld-row-body ul a { font-size: 14px; color: var(--lilac); text-decoration: none; }
.ld-row-body ul a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ld-row-pics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 92px; border-radius: var(--r-3); background: var(--mat); border: 1px solid var(--line); }
.ld-row-pics img { width: 100%; height: 100%; object-fit: contain; padding: 6px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.ld-row-pics.fill { overflow: hidden; gap: 1px; }
.ld-row-pics.fill img { object-fit: cover; padding: 0; filter: none; }

/* ── from a picture to the code ── */
.ld-code { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding: 72px 0; }
.ld-code-pic { display: block; aspect-ratio: 4 / 3; border: 1px solid var(--line-2); border-radius: 22px; background: var(--mat); }
.ld-code-pic img { width: 100%; height: 100%; object-fit: contain; padding: 4%; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .6)); transition: transform var(--d-3) var(--ease); }
.ld-code-pic:hover img { transform: translateY(-6px); }
.ld-code-copy .ld-open { margin-top: 20px; }
.ld-code-copy p { max-width: 52ch; margin: 0 0 22px; font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.ld-lua { margin: 0 0 26px; padding: 20px 22px; overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--sunken); font: 500 13.5px/1.75 'JetBrains Mono', monospace; color: var(--text); }
.ld-lua .k { color: var(--lilac); }
.ld-lua .s { color: var(--warning); }
.ld-lua .n { color: var(--success); }
.ld-lua .c { color: var(--faint); }

.ld-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 28px 0 40px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted); }
.ld-foot p { margin: 0; }
.ld-foot a { color: var(--lilac); }

@media (max-width: 1240px) {
  .ld-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ld-plate { max-width: 760px; }
}
@media (max-width: 1100px) {
  .ld-row { grid-template-columns: 220px minmax(0, 1fr); }
  .ld-row-pics { grid-column: 2; }
}
@media (max-width: 900px) {
  .ld-top-in { gap: 12px; height: 60px; }
  .ld-brand > span:last-child { display: none; }
  .ld-links-sep, .ld-links .ld-ext { display: none; }
  .ld-links a { padding: 0 10px; font-size: 14px; }
  .ld-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 12px 0 48px; }
  .ld-copy p { font-size: 16.5px; }
  .ld-plate { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spec:nth-child(4n) { border-right: 1px dashed rgba(196, 181, 253, .1); }
  .spec:nth-child(3n) { border-right: 0; }
  .spec:nth-last-child(-n + 4) { border-bottom: 1px dashed rgba(196, 181, 253, .1); }
  .spec:nth-last-child(-n + 3) { border-bottom: 0; }
  .ld-row, .ld-row.no-pics { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ld-row-pics { grid-column: auto; height: 80px; }
  .ld-code { grid-template-columns: minmax(0, 1fr); padding: 48px 0; }
}
