/* The home page (templates/home.html), loaded after frame.css: it uses the frame's tokens and its own pieces. */

/* The house purple, on this page only: --house for text and links, --house-fill for fills and borders. */
body.home {
  --accent: var(--ink); --accent-ink: var(--surface); --accent-soft: var(--bg);
  --second: var(--muted); --second-ink: var(--surface); --second-soft: var(--bg);
  --house: #6d28d9; --house-fill: #8b5cf6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-colour-mode="light"]) body.home { --house: #a78bfa; }
}
:root[data-colour-mode="dark"] body.home { --house: #a78bfa; }
.home-main { max-width: 980px; margin: 0 auto; padding: clamp(28px, 5vw, 72px) clamp(16px, 4vw, 56px) 64px; }
.home-main a:not(.primary):not(.switch-item):not(.house) { color: var(--house); text-underline-offset: 3px; }

/* The badge: scaled by height only, never cropped or stretched; clear space of at least a tenth of its height all round. */
.hero { display: flex; align-items: center; gap: clamp(28px, 5vw, 56px); }
.hero-badge { display: block; flex: none; height: 200px; width: auto; }
.hero-text { min-width: 0; }
.hero-text h1::after { content: ""; display: block; width: 64px; height: 4px; margin-top: .45em; border-radius: 2px; background: var(--house-fill); }
@media (max-width: 760px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-badge { height: 160px; }
}
.home-main h1 {
  font-family: var(--display); font-weight: 600; font-stretch: 87.5%;
  font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.06; letter-spacing: -.01em;
  margin: 0 0 .45em; max-width: 20ch; text-wrap: balance;
}
.home-main .lead { max-width: 36em; }

/* The products: one wide row each, the product's own colour as a bar down its left edge. */
.pick { margin: 3em 0 0; }
.pick h2, .about h2 { margin: 0 0 1em; font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; color: var(--house); }
.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.product {
  --row: var(--row-light); --row-ink: var(--row-light-ink);
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px 22px; align-items: center;
  padding: 22px 24px 22px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-colour-mode="light"]) .product { --row: var(--row-dark); --row-ink: var(--row-dark-ink); }
}
:root[data-colour-mode="dark"] .product { --row: var(--row-dark); --row-ink: var(--row-dark-ink); }
.product::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--row); }
.product.coming { background: transparent; }
.product-mark { display: block; width: 56px; height: 56px; border-radius: 12px; }
.product-tile { display: grid; place-items: center; background: var(--row); color: var(--row-ink); font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1; }
.product-name { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.product-line { margin: .3em 0 0; max-width: 40em; }
.product.coming .product-line { color: var(--muted); }
.product-status { margin: .35em 0 0; color: var(--muted); font-size: .92rem; }
.product .primary { background: var(--row); color: var(--row-ink); white-space: nowrap; }
.product .primary:focus-visible { outline: 3px solid var(--row); outline-offset: 3px; }
@media (max-width: 640px) {
  .product { grid-template-columns: 48px minmax(0, 1fr); padding: 18px 18px 18px 24px; }
  .product-mark { width: 48px; height: 48px; }
  .product .primary { grid-column: 1 / -1; justify-self: start; }
}

.about { margin: 3em 0 0; max-width: 40em; }
.about p { margin: 0 0 .8em; font-size: 1.08rem; }
.questions { margin: 2em 0 0; max-width: 40em; font-size: 1.08rem; }
.company-line { margin: 1.4em 0 0; max-width: 40em; font-size: 1.08rem; }
.signoff { margin: 1.4em 0 0; max-width: 40em; font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--house); }

/* How every manual works: three real pieces of a manual, drawn by frame.css's own rules. */
.how { margin: 3em 0 0; padding: 30px 0 0; border-top: 2px solid var(--house-fill); }
.how h2 { margin: 0 0 1.1em; font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; color: var(--house); }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.how-list li { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.how-list p { margin: 0; max-width: 20em; }
.how-sample { display: flex; align-items: center; min-height: 96px; }
.how .step-label { min-width: 88px; padding: 8px 12px 10px; }
.how .step-label .code { font-size: 2.4rem; }
.how .stuck { cursor: default; }
.how .stuck:hover { background: var(--surface); }
.frozen-sample { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border: 1.5px dashed var(--wire); border-radius: 8px; background: var(--surface); color: var(--ink); font-family: var(--display); font-weight: 600; font-size: .95rem; }
.frozen-sample::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--muted); }
@media (max-width: 760px) { .how-list { grid-template-columns: 1fr; gap: 24px; } .how-sample { min-height: 0; } }
.home-foot { margin-top: 56px; }
