/* Home page prototype 1 (/home1, ui/home1.js): a goal-first finder. Uses app.css's tokens and components. */

.h1-page { max-width: 1180px; }

/* hero: the question and the search */
.h1-hero { padding: 26px 0 8px; max-width: 760px; }
.h1-title { margin: 0; font-weight: 780; font-size: clamp(34px, 5.2vw, 60px); line-height: .98;
  font-variation-settings: "wdth" 80; letter-spacing: -0.02em; }
.h1-lede { font-family: var(--f-read); font-size: clamp(17px, 1.8vw, 20px); line-height: 1.5; color: var(--ink-2);
  margin: 14px 0 22px; max-width: 60ch; }
.h1-search { max-width: 640px; }
.h1-search input { height: 52px; font-size: 16px; padding: 0 112px 0 44px; box-shadow: 0 1px 0 var(--rule); }
.h1-search .lens { left: 17px; }
.h1-go { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--cobalt); color: #fff; font: 650 14.5px var(--f-ui); cursor: pointer; }
.h1-go:hover { filter: brightness(1.08); }
.h1-go:focus-visible { outline: 3px solid var(--cobalt-wash); outline-offset: 2px; }

/* section headings */
.h1-sec { margin-top: 44px; }
.h1-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.h1-sec-head h2, .h1-how h2, .h1-all h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 750;
  font-variation-settings: "wdth" 84; letter-spacing: -0.01em; }
.h1-sec-head a { color: var(--cobalt); font-weight: 600; font-size: 14.5px; }
.h1-sec-note { color: var(--ink-2); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.h1-sec-dek { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }

/* goal tiles */
.h1-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; margin-top: 18px; }
.h1-goal { display: flex; flex-direction: column; min-width: 0; background: var(--sheet); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 16px 16px 14px; transition: border-color .15s, box-shadow .15s; }
.h1-goal:hover { border-color: var(--ink-3); box-shadow: 0 8px 24px rgb(17 26 22 / .06); }
.h1-goal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.h1-goal-head h3 { margin: 0; font-size: 20px; font-weight: 750; font-variation-settings: "wdth" 84; line-height: 1.15; }
.h1-goal-head:hover h3 { color: var(--cobalt); }
.h1-goal-n { flex: none; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.h1-best { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  margin-top: 12px; padding: 10px; border-radius: var(--r-md); background: var(--sheet-2); }
.h1-best:hover { color: inherit; background: var(--cobalt-wash); }
.h1-best .thumb { width: 76px; height: 76px; }
.h1-best-text { display: flex; flex-direction: column; min-width: 0; }
.h1-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--good); }
.h1-best-name { font-weight: 640; font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.h1-best:hover .h1-best-name { color: var(--cobalt); }
.h1-best .p-brand { font-size: 12.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h1-best-score .score { gap: 6px; flex-direction: column; align-items: flex-end; }
.h1-best-score .capsule { width: 38px; height: 11px; }

.h1-next { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: h1n 1; }
.h1-next li { counter-increment: h1n; }
.h1-next a { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: baseline;
  padding: 6px 4px; font-size: 14px; border-bottom: 1px solid var(--rule); }
.h1-next li:last-child a { border-bottom: 0; }
.h1-next a::before { content: counter(h1n); color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.h1-next-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h1-sc { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--c); }

.h1-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.h1-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sheet); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.h1-chip:hover { border-color: var(--cobalt); color: var(--cobalt); }
.h1-goal-all { margin-top: auto; padding-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--cobalt); }

.h1-more { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 18px; padding: 14px 16px;
  border: 1px dashed var(--rule); border-radius: var(--r-lg); }
.h1-more > span { font-weight: 600; font-size: 14.5px; }
.h1-more .h1-chips { margin-top: 0; }

/* how we score */
.h1-how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px 36px; margin-top: 52px;
  padding: 24px; border-radius: var(--r-lg); background: var(--sheet); border: 1px solid var(--rule); }
.h1-how h2 { display: flex; align-items: center; gap: 8px; }
.h1-how-intro p { font-family: var(--f-read); font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 10px 0 12px; }
.h1-how-intro a { color: var(--cobalt); font-weight: 600; font-size: 14.5px; }
.h1-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.h1-parts li { display: flex; flex-direction: column; gap: 3px; padding-top: 10px; border-top: 2px solid var(--ink); }
.h1-parts b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.h1-parts span { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

/* guides */
.h1-guides { margin-top: 16px; }

/* everything */
.h1-all { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
  margin-top: 48px; padding: 24px; border-radius: var(--r-lg); background: var(--ink); color: var(--paper); }
.h1-all p { margin: 6px 0 0; color: color-mix(in srgb, var(--paper) 78%, transparent); font-size: 15px; max-width: 60ch; }
.h1-all-btn { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 650; white-space: nowrap; }
.h1-all-btn:hover { color: var(--cobalt); }

.h1-skel-goal { height: 290px; border-radius: var(--r-lg); }

@media (max-width: 900px) {
  .h1-how { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}
@media (max-width: 560px) {
  .h1-hero { padding-top: 10px; }
  .h1-search input { padding-right: 92px; }
  .h1-go { padding: 0 14px; }
  .h1-sec { margin-top: 34px; }
  .h1-goal { padding: 14px 12px 12px; }
  .h1-best { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; padding: 8px; }
  .h1-best .thumb { width: 60px; height: 60px; }
  .h1-parts { grid-template-columns: minmax(0, 1fr); }
  .h1-all { padding: 20px 18px; }
  .h1-all-btn { width: 100%; justify-content: center; }
  .h1-guides { grid-template-columns: minmax(0, 1fr); }
}
