/*
 * Homepage only ("Launchpad v2"). Linked from site/index.html and from no other page, so every other page keeps its
 * look. Class names start with "hp-" (no clash with styles.css or the shared .otw- header/footer rules, which have a
 * homepage variant of their own in otw-chrome.css, selected by ".otw-home").
 * Colors come from the approved design; the category colors are the BRAND.md triples (main / deep / light).
 * Fonts are served from this site (/fonts/), never from a third party; their @font-face rules live in otw-chrome.css (shared by every page).
 */

body.home {
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: #0f213a;
}
.home .hp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); box-sizing: border-box; }
.home main a:focus-visible { outline: 3px solid #3c66f5; outline-offset: 3px; }

/* Hero (the shared header above it is navy too, so the two read as one band) */
.hp-hero { background: #0f213a; color: #fff; }
.hp-hero .hp-wrap { padding-top: clamp(8px, 2vw, 24px); padding-bottom: clamp(96px, 9vw, 112px); }
.hp-hero h1 {
  margin: 0 0 14px; max-width: 960px;
  font-family: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif; font-weight: 800;
  font-size: clamp(36px, 5.6vw, 64px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance;
}
.hp-hero h1 span { color: #8fa8ff; }
.hp-hero p { margin: 0; max-width: 640px; font-size: clamp(17px, 2.4vw, 20px); line-height: 1.5; color: #c7d2e6; text-wrap: pretty; }

/* Cards pull up 80px into the hero */
.hp-widgets { position: relative; }
.hp-widgets .hp-wrap { margin-top: -80px; padding-bottom: 24px; }
.hp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

/* Categories stack, complete, until three columns fit comfortably. Cards stay inside their own category at every width. */
.hp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.hp-category-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px; }
@media (min-width: 1120px) {
  .hp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .hp-category-cards { grid-template-columns: minmax(0, 1fr); }
}
/*
 * Cards in the same row match in height across the columns: every column shares the rows of .hp-grid. Unused rows have
 * no height, so the span only has to exceed the longest category (heading + cards). Browsers without subgrid keep the
 * layout above, with cards at their natural heights.
 */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1120px) {
    .hp-grid { row-gap: 0; }
    .hp-category { display: grid; grid-row: 1 / span 30; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); }
    .hp-category-cards { grid-row: 2 / -1; grid-template-rows: subgrid; row-gap: 0; }
    .hp-category-cards .hp-card + .hp-card { margin-top: 24px; }
  }
}

.hp-card, .hp-category { --cat-main: #15b8a6; --cat-deep: #0b7469; --cat-light: #e8f8f5; }
.hp-card--money, .hp-category--money { --cat-main: #ffb347; --cat-deep: #8f5200; --cat-light: #fff3e2; }
.hp-card--organizing, .hp-category--organizing { --cat-main: #7757e8; --cat-deep: #5835c4; --cat-light: #f1edfd; }
/* A white pill, like the card labels, so the heading reads on the navy hero and on the page background. */
.hp-category-title {
  display: flex; align-items: center; gap: 8px; width: fit-content; box-sizing: border-box; margin: 0 0 16px; padding: 6px 16px;
  border: 1px solid #d8dfe9; border-radius: 999px; background: #fff; color: var(--cat-deep);
  font-family: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif; font-weight: 700; font-size: 18px; line-height: 1.3;
}
.hp-card { background: #fff; border: 1px solid #d8dfe9; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 14px 36px rgba(15, 33, 58, 0.14); }
.hp-tile { position: relative; height: clamp(96px, 14vw, 132px); background: var(--cat-light); display: flex; align-items: center; justify-content: center; }
.hp-label { position: absolute; top: 12px; left: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--cat-deep); font-weight: 700; font-size: 13.5px; line-height: 1.55; }
.hp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat-main); }
.hp-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.hp-card h4 { margin: 0; font-family: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif; font-weight: 700; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; }
.hp-card p { margin: 0; flex: 1; font-size: 16px; line-height: 1.55; color: #3a4860; text-wrap: pretty; }
.hp-btn {
  margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 22px;
  box-sizing: border-box; border-radius: 999px; background: var(--cat-deep); color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1.55;
}
.hp-more { margin: 28px 0 0; text-align: center; font-size: 16px; color: #4d5b6e; }
