/* home.css — the homepage below its hero, published beside index.html.
   ------------------------------------------------------------------------
   Loaded after styles.css, and only by the homepage. The hero (headline,
   search, explore strip) keeps its styles in styles.css;
   this file styles only what src/build/home.js writes below it:

     .home            the white content area under the hero
     .home-section    one titled card section
     .home-eyebrow    a section's heading, set as a centered uppercase label
     .tool-card       a BPOZZ tool: large pastel card, one tone per tool
     .resource-card   a further resource: wide, neutral, title + text only

   Every card is one real link: the title's <a> is stretched over the whole
   card, so the card is clickable without JavaScript and the link's name is
   just the title. The tool CTA line is decorative (aria-hidden). */

/* ---------- home layout ---------- */

.home {
  display: block;
  padding: 96px 32px 128px;
  background-color: var(--card);
  outline: none;
}

.home-section {
  max-width: 1320px;
  margin: 0 auto;
}
.home-section--resources {
  max-width: 1740px;
}
.home-section + .home-section {
  margin-top: 120px;
}

.home-eyebrow {
  margin-bottom: 40px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- shared card behavior ---------- */

.tool-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tool-grid {
  gap: 28px;
}
.resource-grid {
  gap: 30px;
}

.tool-card,
.resource-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 16px;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.tool-card__link,
.resource-card__link {
  color: inherit;
  text-decoration: none;
  outline: none;
}
/* Stretched link: the whole card is the target. */
.tool-card__link::after,
.resource-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.tool-card__link:focus-visible::after,
.resource-card__link:focus-visible::after {
  outline: 3px solid var(--card-ink, var(--action));
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .resource-card,
  .tool-card__arrow {
    transition: none;
  }
  .tool-card:hover,
  .tool-card:focus-within,
  .resource-card:hover,
  .resource-card:focus-within {
    transform: none;
  }
}

/* ---------- tool cards ----------
   One pastel ground and one strong heading color per tool. Each
   --card-ink passes WCAG AA (4.5:1) on its --card-bg and its hover
   ground; src/build/home.test.js checks the pairs. Hover and keyboard
   focus both deepen the ground, lift the card and nudge the arrow. */

.tool-card {
  --card-bg: #eef2f8;
  --card-bg-hover: #e3e9f3;
  --card-ink: var(--action);
  min-height: 332px;
  padding: 36px 36px 32px;
  background-color: var(--card-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--card-ink) 16%, transparent);
}
.tool-card:hover,
.tool-card:focus-within {
  background-color: var(--card-bg-hover);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--card-ink) 30%, transparent);
  transform: translateY(-3px);
}
.tool-card--cyan {
  --card-bg: #c8ebf5;
  --card-bg-hover: #b2e2f0;
  --card-ink: #04495a;
}
.tool-card--blue {
  --card-bg: #dde6fd;
  --card-bg-hover: #cad8fb;
  --card-ink: #1a3db5;
}
.tool-card--lavender {
  --card-bg: #e7dffb;
  --card-bg-hover: #d9ccf8;
  --card-ink: #4a2ca8;
}
.tool-card--pink {
  --card-bg: #fbdeeb;
  --card-bg-hover: #f7cadf;
  --card-ink: #961450;
}
.tool-card--orange {
  --card-bg: #fde5cc;
  --card-bg-hover: #fbd6b0;
  --card-ink: #833703;
}
.tool-card--green {
  --card-bg: #d8f1e0;
  --card-bg-hover: #c4e9d1;
  --card-ink: #0e5c2e;
}

.tool-card__title {
  font-size: clamp(42px, 4vw, 54px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
  color: var(--card-ink);
}
.tool-card__desc {
  max-width: 42ch;
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.4;
  color: #273142;
}
.tool-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 32px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--card-ink);
}
.tool-card__arrow {
  font-size: 1.6em;
  line-height: 1;
  letter-spacing: 0;
  transition: transform 0.2s ease;
}
.tool-card:hover .tool-card__arrow,
.tool-card:focus-within .tool-card__arrow {
  transform: translateX(6px);
}

/* ---------- resource cards ----------
   Neutral and quiet next to the tools: a title and a short description,
   nothing else. Hover deepens the gray, lifts the card slightly. */

.resource-card {
  min-height: 212px;
  padding: 36px;
  background-color: #eceff3;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.resource-card:hover,
.resource-card:focus-within {
  background-color: #dfe4eb;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.22);
  transform: translateY(-2px);
}
.resource-card__title {
  font-size: clamp(30px, 2.4vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  color: var(--text);
}
.resource-card__desc {
  display: -webkit-box;
  margin-top: 14px;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.45;
  color: #3f4a60;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* ---------- tablet ---------- */

@media (max-width: 1024px) {
  .home {
    padding: 72px 24px 96px;
  }
  .home-section + .home-section {
    margin-top: 96px;
  }
  .home-eyebrow {
    margin-bottom: 32px;
    font-size: 16px;
  }
  .tool-grid,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .tool-card {
    min-height: 290px;
    padding: 32px 30px 28px;
  }
  .tool-card__title {
    font-size: clamp(34px, 4.2vw, 42px);
  }
  .tool-card__desc,
  .resource-card__desc {
    font-size: 18px;
  }
  .resource-card {
    min-height: 196px;
    padding: 32px 30px;
  }
  .resource-card__title {
    font-size: 30px;
  }
}

/* ---------- phone ---------- */

@media (max-width: 640px) {
  .home {
    padding: 56px 16px 80px;
  }
  .home-section + .home-section {
    margin-top: 72px;
  }
  .home-eyebrow {
    margin-bottom: 24px;
    font-size: 14px;
    letter-spacing: 0.18em;
  }
  .tool-grid,
  .resource-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .tool-card {
    min-height: 0;
    padding: 28px 24px 24px;
  }
  .tool-card__title {
    font-size: 34px;
  }
  .tool-card__desc {
    margin-top: 12px;
    font-size: 17px;
  }
  .tool-card__cta {
    padding-top: 28px;
    font-size: 13px;
  }
  .resource-card {
    min-height: 0;
    padding: 28px 24px;
  }
  .resource-card__title {
    font-size: 28px;
  }
  .resource-card__desc {
    margin-top: 10px;
    font-size: 17px;
  }
}
