/* Wipeout AI - the public pages' own components: the homepage (idea box, two rows of games, how it works with the
   studio loop, the plans and packs), explore.html, about.html, the drafts (privacy.html, terms.html) and 404.html.
   Tokens only (tokens.css); app.css holds what every page shares. */

/* ---------------------------------------------------------------- the idea box: copy on the left, the studio on the right */
.make-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; text-align: left; padding: 30px 32px; min-height: 420px; }
.make-hero h1 { margin: 12px 0 8px; max-width: 22ch; font-size: clamp(28px, 3.3vw, 40px); }
.make-hero .lead { margin: 0 0 16px; max-width: 58ch; }
.make-hero .make-box { margin: 0; max-width: none; }
.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.idea-chips .chip { font-size: 13px; padding: 7px 13px; }
.idea-try { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-right: 2px; }
.chip-surprise { border-style: dashed; color: var(--text); }
.chip-surprise .ic { color: var(--gold-text); }
.make-hero .make-points { justify-content: flex-start; flex-direction: column; gap: 8px; margin-top: 16px; }
.make-hero .make-points li { align-items: flex-start; }
.make-hero .make-points .ic { margin-top: 3px; }
.make-points b { color: var(--text); }
.proof { margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-sm); color: var(--muted); }
.proof b { color: var(--text); font-family: var(--font-display); font-weight: 600; }
.proof .ic { color: var(--gold-text); }
.studio-peek { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface-2); cursor: pointer; box-shadow: var(--shadow-sm); }
.studio-peek img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.studio-peek:hover img { transform: scale(1.02); }
.peek-play { position: absolute; left: 14px; bottom: 14px; display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: var(--r-pill); background: rgba(10, 11, 16, 0.78); color: #f2f3f5; font-weight: 700; font-size: var(--fs-sm); backdrop-filter: blur(6px); }
.peek-play small { color: #c9ccd3; font-weight: 600; }
.peek-play .ic { width: 16px; height: 16px; color: #ffd47a; }

/* ---------------------------------------------------------------- two rows of games */
.home-games { margin-top: 48px; }
.head-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.head-tools .link-more { min-height: 44px; }
.first-panel { grid-column: span 2; display: grid; gap: 12px; align-content: center; justify-items: start; padding: 24px; border-radius: 18px; border: 1px dashed var(--line-2); background: var(--surface); min-height: 260px; }
.games.is-few .first-panel { grid-column: span 3; }
.first-panel h3 { font-size: var(--fs-xl); }
.first-panel .ai-orb { width: 44px; height: 44px; border-radius: 13px; }
.first-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.first-ideas .chip { font-size: 13px; text-align: left; white-space: normal; }
.ours-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: var(--fs-sm); color: var(--muted); max-width: 900px; }
.ours-note .ic { width: 16px; height: 16px; color: var(--gold-text); margin-top: 3px; }
.ours-note b { color: var(--text); }

/* ---------------------------------------------------------------- how it works, with the loop */
.how { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.how-video { margin: 0; display: grid; gap: 10px; }
.how-video video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: block; object-fit: cover; }
.how-video figcaption { font-size: var(--fs-sm); color: var(--muted); }
.how .steps { grid-template-columns: 1fr; gap: 12px; }
.how .step { padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
.how .step .ai-orb { margin: 0; grid-row: span 3; width: 44px; height: 44px; }
.how .step::before { font-size: 30px; top: 14px; }
.how .step h3 { font-size: var(--fs-lg); margin: 2px 0 4px; padding-right: 30px; }
.how .step .mini { margin-top: 10px; }
.loop-dialog { width: min(900px, 100%); }
.loop-dialog video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }
.loop-dialog .btn { justify-self: start; }

/* ---------------------------------------------------------------- plans and packs */
.plan-cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-card { display: flex; flex-direction: column; }
.plan-card ul { flex: 1; margin-bottom: 16px; }
.plan-card .btn { margin-top: auto; }
.plan-card .btn[disabled] { opacity: 1; color: var(--muted); border-style: dashed; cursor: default; }
.plan-card.free { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.plan-card .tag { font-size: 12px; }
.plan-card .tag.tag-teal { background: var(--teal); color: var(--teal-ink); }
.plan-card .cr .buys { display: block; color: var(--muted); font-weight: 600; margin-top: 2px; }
.plan-card abbr { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.packs-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 16px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.packs-row h3 { font-size: var(--fs-lg); }
.packs-row p { font-size: var(--fs-sm); }
.pack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.pack-list li { display: grid; gap: 2px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); min-width: 120px; }
.pack-list b { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); }
.pack-list span { color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }

/* ---------------------------------------------------------------- explore */
.explore-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 4px 0 22px; }
.explore-filters .chips { gap: 6px; }
.filter-label { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.explore-count { color: var(--muted); font-size: var(--fs-sm); margin-left: auto; }

/* ---------------------------------------------------------------- about, the drafts, 404 */
.draft-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold); color: var(--text); font-size: var(--fs-sm); margin-top: 24px; }
.draft-banner .ic { color: var(--gold-text); margin-top: 2px; }
.prose .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.prose .toc a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.prose h2 { scroll-margin-top: calc(var(--head) + 16px); }
.prose .updated { color: var(--muted); font-size: var(--fs-sm); }
.prose strong { color: var(--text); }
.prose .placeholder { background: var(--gold-soft); color: var(--text); padding: 1px 6px; border-radius: 6px; font-weight: 700; }
.nf { max-width: 640px; margin: 64px auto 0; text-align: center; display: grid; gap: 16px; justify-items: center; min-height: 52vh; align-content: start; }
.nf h1 { font-size: var(--fs-3xl); }
.nf .search { width: 100%; max-width: 480px; margin: 4px 0 0; height: 48px; }
.nf .row-btns { justify-content: center; }
.nf-games { margin-top: 40px; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .plan-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .make-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 22px 18px; gap: 18px; }
  .studio-peek { display: none; }
  .how { grid-template-columns: 1fr; }
  .first-panel, .games.is-few .first-panel { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 520px) {
  .make-hero h1 { font-size: 27px; }
  .idea-chips .chip { font-size: 13px; }
  .games.two-rows > .gcard:nth-child(n+7) { display: none; }
  .plan-cards.four { grid-template-columns: 1fr; }
  .how .step { grid-template-columns: 1fr; }
  .how .step .ai-orb { grid-row: auto; margin-bottom: 10px; }
  .pack-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; flex: none; }
  .pack-list li { min-width: 0; padding: 10px; }
  .pack-list b { font-size: var(--fs-md); }
  .explore-count { margin-left: 0; width: 100%; }
}
.about-title { font-size: var(--fs-3xl); margin: 10px 0 12px; }
.explore-grid, .search-grid { min-height: 60vh; align-content: start; }
/* the real numbers arrive after the page: their line is reserved, so nothing moves when they do */
.proof { min-height: 22px; visibility: hidden; }
.proof.on { visibility: visible; }
/* pages whose content arrives after load keep the footer below the first screen, so it is not pushed while visible */
body[data-page="404"] > main, body[data-page="explore"] > main { min-height: 100vh; }
@media (max-width: 520px) {
  /* the examples in one swipeable line on a phone, so the games start sooner */
  .idea-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .idea-chips::-webkit-scrollbar { display: none; }
  .idea-chips .chip { flex: none; }
  .idea-try { display: none; }
  .make-hero .lead { font-size: 15px; }
}
/* the filter row wraps to two lines on narrower screens: it is reserved, so the games below do not jump when the
   fonts arrive */
@media (max-width: 1400px) and (min-width: 861px) { .explore-filters { min-height: 104px; align-content: flex-start; } }

/* ---------------------------------------------------------------- the devlog's newest three (js/devlog.js) */
.dl-teaser .link-more { min-height: 44px; }
.dl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dl-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.dl-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.dl-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.dl-card-art { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.dl-card-art img { width: 100%; height: 100%; object-fit: cover; }
.dl-card-body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.dl-card time { color: var(--gold-text); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.dl-card b { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); line-height: 1.2; }
.dl-card-text { color: var(--muted); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) { .dl-cards { grid-template-columns: 1fr; } .dl-card { flex-direction: row; } .dl-card-art { width: 38%; flex: none; aspect-ratio: auto; } }
@media (max-width: 520px) { .dl-card { flex-direction: column; } .dl-card-art { width: 100%; aspect-ratio: 16 / 9; } }
@media (prefers-reduced-motion: reduce) { .dl-card { transition: none; } .dl-card:hover { transform: none; } }
