/* Homepage-only visual system inspired by the approved JobsiteMeasure render.
   This file deliberately does not style calculator/detail pages. */

.home-page {
  background:
    radial-gradient(circle at 84% 8%, rgba(35, 120, 230, .08), transparent 24rem),
    linear-gradient(180deg, #f7fbff 0, #ffffff 34rem, #f7fafc 100%);
  color: #13243a;
}

.home-page .page {
  width: min(1380px, calc(100% - 48px));
  padding-top: 0;
  padding-bottom: 34px;
}

.home-page .site-header {
  min-height: 74px;
  padding: 0 4px;
  border-bottom: 1px solid #dfe8f1;
}

.home-page .brand {
  color: #0d2b55;
  font-size: 1.08rem;
  letter-spacing: -.03em;
}

.home-page .brand::first-line {
  color: #0b3f91;
}

.home-page .brand small {
  margin-top: -2px;
  color: #526982;
  font-size: .68rem;
  letter-spacing: 0;
}

.home-primary-nav {
  display: flex;
  align-items: stretch;
  gap: 30px;
  min-height: 74px;
  margin-left: auto;
}

.home-primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #15355d;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
}

.home-primary-nav a:hover {
  color: #0668df;
}

.home-primary-nav a[aria-current="page"] {
  color: #0668df;
}

.home-primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #0a74f5;
}

.home-page .site-header > .site-nav {
  display: none;
}

.home-page .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, .7fr);
  column-gap: 58px;
  align-items: center;
  max-width: none;
  padding: 48px 4px 34px;
}

.home-page .hero > :not(.home-hero-callout) {
  grid-column: 1;
}

.home-page .eyebrow {
  color: #a64012;
  font-size: .76rem;
  letter-spacing: .12em;
}

.home-page h1 {
  max-width: 820px;
  color: #0b2a58;
  font-size: clamp(2.8rem, 5.4vw, 5rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.home-page .hero-lead {
  max-width: 790px;
  color: #334c68;
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.5;
}

.home-page .trust-strip {
  gap: 10px;
  margin-top: 18px;
}

.home-page .trust-strip span {
  padding: 7px 13px;
  border-color: #bfe4d3;
  background: #effbf5;
  color: #17563f;
  font-size: .8rem;
}

.home-hero-callout {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border: 1px solid #d8e8fb;
  border-radius: 14px;
  background: linear-gradient(135deg, #edf6ff, #f7fbff);
  box-shadow: 0 12px 30px rgba(34, 91, 154, .08);
}

.home-hero-callout-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: #0b72e7;
  color: white;
  font-size: 1.6rem;
  line-height: 1;
}

.home-hero-callout strong {
  display: block;
  color: #075cc4;
  font-size: .95rem;
}

.home-hero-callout p {
  margin: 4px 0 0;
  color: #4d6680;
  font-size: .82rem;
  line-height: 1.4;
}

.home-page .calculator[aria-labelledby="calculator-list-title"] {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-page .calculator[aria-labelledby="calculator-list-title"] > .section-heading {
  margin: 0 0 20px;
  padding: 0 4px;
  border: 0;
}

.home-page .calculator[aria-labelledby="calculator-list-title"] > .section-heading .step-label {
  display: none;
}

.home-page #calculator-list-title {
  color: #0b2a58;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -.035em;
}

.home-page .calculator[aria-labelledby="calculator-list-title"] > .section-heading p {
  color: #536b84;
  font-size: .96rem;
}

.catalogue-group {
  overflow: hidden;
  margin: 0 0 22px;
  border: 1px solid #d9e4ef;
  border-radius: 15px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 26px rgba(24, 62, 102, .055);
}

.catalogue-group-heading {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 14px 18px;
  border-bottom: 1px solid #e0e9f1;
}

.catalogue-group-heading h3 {
  margin: 0;
  color: #0b2a58;
  font-size: 1.18rem;
  letter-spacing: -.025em;
}

.catalogue-group-heading p {
  margin: 2px 0 0;
  color: #5b7188;
  font-size: .84rem;
}

.catalogue-count {
  color: #46627e;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}

.catalogue-group-icon,
.home-card-icon {
  display: block;
  flex: 0 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 58%;
}

.catalogue-group-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.catalogue-group--concrete-sitework .catalogue-group-icon,
.home-calculator-card[data-catalogue-group="concrete-sitework"] .home-card-icon {
  background-color: #e8f3ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 12 16 6l10 6-10 6L6 12Z'/%3E%3Cpath d='m6 12 10 6 10-6v10l-10 5-10-5V12Z'/%3E%3C/svg%3E");
}

.catalogue-group--materials-groundworks .catalogue-group-icon,
.home-calculator-card[data-catalogue-group="materials-groundworks"] .home-card-icon {
  background-color: #e9f9ef;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23169357' stroke-width='2.2'%3E%3Ccircle cx='10' cy='19' r='4'/%3E%3Ccircle cx='17' cy='13' r='4'/%3E%3Ccircle cx='23' cy='20' r='4'/%3E%3C/svg%3E");
}

.catalogue-group--building-exterior .catalogue-group-icon,
.home-calculator-card[data-catalogue-group="building-exterior"] .home-card-icon {
  background-color: #fff0e4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23c65b16' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M5 15 16 6l11 9v11H5V15Z'/%3E%3Cpath d='M12 26v-8h8v8'/%3E%3C/svg%3E");
}

.home-page .catalogue-group .result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}

.home-calculator-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: start;
  min-height: 154px;
  padding: 18px 16px;
  border: 0;
  border-right: 1px solid #e3eaf1;
  border-bottom: 1px solid #e3eaf1;
  border-radius: 0;
  background: #fff;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.home-calculator-card:hover {
  z-index: 1;
  background: #fbfdff;
  box-shadow: 0 10px 24px rgba(25, 78, 134, .10);
  transform: translateY(-1px);
}

.home-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.home-card-copy {
  display: contents;
}

.home-calculator-card h3 {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  margin: 0 0 4px;
  padding: 0 22px;
  font-size: .92rem;
  line-height: 1.25;
  text-align: center;
}

.home-calculator-card .home-card-icon {
  grid-column: 1;
  grid-row: 2;
}

.home-calculator-card p {
  grid-column: 2;
  grid-row: 2;
}

.home-calculator-card .home-card-arrow {
  grid-column: 3;
  grid-row: 2;
}

.home-calculator-card h3 a {
  color: #075cc4;
  text-decoration: none;
}

.home-calculator-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.home-calculator-card p {
  margin: 0;
  color: #415b76;
  font-size: .78rem;
  line-height: 1.45;
}

.home-card-arrow {
  align-self: center;
  color: #0a74f5;
  font-size: 1.15rem;
  font-weight: 800;
}

.home-page .method-note {
  border-color: #dce7f0;
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 22px rgba(24, 62, 102, .045);
}

.home-page .method-note h2,
.home-page .method-note h3 {
  color: #0b2a58;
}

.home-page .site-footer {
  margin-top: 0;
  border-top: 0;
  background: #082a4a;
  color: #d9e7f4;
}

.home-page .site-footer a {
  color: #fff;
}

@media (max-width: 1120px) {
  .home-primary-nav { gap: 20px; }
  .home-page .catalogue-group .result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .home-page .page { width: min(100% - 28px, 1380px); }
  .home-primary-nav { display: none; }
  .home-page .site-header > .site-nav { display: block; width: auto; }
  .home-page .site-header { flex-direction: row; align-items: center; }
  .home-page .site-nav .calculator-menu { width: auto; }
  .home-page .hero { grid-template-columns: 1fr; padding-top: 34px; }
  .home-page .hero > :not(.home-hero-callout),
  .home-hero-callout { grid-column: 1; }
  .home-hero-callout { grid-row: auto; max-width: 560px; margin-top: 20px; }
  .home-page .catalogue-group .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .home-page .page { width: min(100% - 18px, 1380px); }
  .home-page .site-header { min-height: 64px; }
  .home-page h1 { font-size: clamp(2.45rem, 13vw, 3.5rem); }
  .home-page .hero { padding: 28px 2px 24px; }
  .catalogue-group-heading {
    grid-template-columns: 44px minmax(0,1fr);
    padding: 12px;
  }
  .catalogue-group-icon { width: 44px; height: 44px; }
  .catalogue-count { grid-column: 2; }
  .home-page .catalogue-group .result-grid { grid-template-columns: 1fr; }
  .home-calculator-card {
    min-height: 0;
    grid-template-columns: 44px minmax(0,1fr) 18px;
    padding: 15px 13px;
    border-right: 0;
  }
  .home-card-icon { width: 44px; height: 44px; }
  .home-page .trust-strip span { flex: 1 1 calc(50% - 8px); }
}


/* Per-calculator pictograms: simple inline SVGs keep the homepage fast and
   avoid external icon/font dependencies. */
.home-calculator-card .home-card-icon {
  background-color: #e8f3ff;
  background-size: 62%;
}
.home-calculator-card[data-catalogue-group="materials-groundworks"] .home-card-icon { background-color: #edf9f1; }
.home-calculator-card[data-catalogue-group="building-exterior"] .home-card-icon { background-color: #fff1e7; }

.home-calculator-card[data-icon="slab"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='M6 21h20l-4-10H10L6 21Z'/%3E%3Cpath d='M7 21v4h18v-4'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="footing"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.3' stroke-linejoin='round'%3E%3Cpath d='M7 10 16 5l9 5-9 5-9-5Z'/%3E%3Cpath d='m7 10 9 5 9-5v12l-9 5-9-5V10Z'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="curb"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='m7 22 14-14 5 3-14 14-5-3Z'/%3E%3Cpath d='m12 25 14-14v5L12 29v-4Z'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="post-hole"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.4'%3E%3Cellipse cx='16' cy='8' rx='6' ry='3'/%3E%3Cpath d='M10 8v16c0 2 2.7 3.5 6 3.5s6-1.5 6-3.5V8'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="headwall"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='M5 26V15C5 8 10 5 16 5s11 3 11 10v11h-6V15c0-3-2-5-5-5s-5 2-5 5v11H5Z'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="manhole"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.3'%3E%3Cellipse cx='16' cy='8' rx='8' ry='3'/%3E%3Cpath d='M8 8v16c0 2 3.6 4 8 4s8-2 8-4V8M8 16c0 2 3.6 4 8 4s8-2 8-4'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="culvert"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M5 24h22M8 24v-7h6l4-8h5l4 15'/%3E%3Cpath d='M12 17h7M19 17l5-4'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="pipe"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.4'%3E%3Cellipse cx='11' cy='20' rx='6' ry='5' transform='rotate(-35 11 20)'/%3E%3Cellipse cx='22' cy='12' rx='6' ry='5' transform='rotate(-35 22 12)'/%3E%3Cpath d='m15 16 3-2M7 24l11-8M15 8l-8 7M26 16l-8 7'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="catch-basin"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='6' y='7' width='20' height='18' rx='2'/%3E%3Cpath d='M10 11v10M15 11v10M20 11v10M25 11v10M7 16h18'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="asphalt"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%230b4e9f' d='M11 3h10l5 26H6L11 3Z'/%3E%3Cpath fill='white' d='M15 7h2v5h-2V7Zm0 8h2v5h-2v-5Zm0 8h2v4h-2v-4Z'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="topsoil"] .home-card-icon,
.home-calculator-card[data-icon="mulch"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23169357' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M25 6C14 7 8 13 8 21c0 3 2 5 5 5 8 0 13-9 12-20Z'/%3E%3Cpath d='M7 27c4-7 9-11 15-15'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="gravel"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.1' stroke-linejoin='round'%3E%3Cpath d='m5 25 3-7 5 1 3-7 5 3 3-1 4 11H5Z'/%3E%3Ccircle cx='10' cy='22' r='2'/%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="sand"] .home-card-icon {
  background-color: #fff3e6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23e87916' d='M5 25c3-8 7-14 11-18 3 6 6 9 11 18H5Z'/%3E%3Cpath fill='%23fff3e6' d='M11 22c3-1 7-1 10 0-3 1-7 1-10 0Z'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="drywall"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.3' stroke-linejoin='round'%3E%3Cpath d='M6 8h19v16H6z'/%3E%3Cpath d='m9 5 17 3v19L9 24V5Z'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="roof-roll"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.3'%3E%3Cellipse cx='11' cy='19' rx='6' ry='5'/%3E%3Cellipse cx='11' cy='19' rx='2' ry='1.7'/%3E%3Cpath d='M11 14h12c3 0 5 2 5 5s-2 5-5 5H11M23 14l-5-5H9'/%3E%3C/svg%3E");
}
.home-calculator-card[data-icon="siding"] .home-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%230b72e7' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='6' y='7' width='20' height='5' rx='1'/%3E%3Crect x='6' y='14' width='20' height='5' rx='1'/%3E%3Crect x='6' y='21' width='20' height='5' rx='1'/%3E%3C/svg%3E");
}

/* Make the directory denser, as in the approved render, without changing the
   user's requested full-tile centred titles. */
.home-calculator-card {
  min-height: 140px;
  padding: 14px 14px 15px;
}
.home-calculator-card h3 { margin-bottom: 2px; }
.catalogue-group { margin-bottom: 14px; }
.catalogue-group-heading { min-height: 68px; padding-block: 10px; }

/* Resource cards at the bottom use their own intuitive pictograms. */
.home-page .content-pathways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.home-page .content-pathways article {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 18px;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 16px 18px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #fff;
}
.home-page .content-pathways article::before {
  content: "";
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1e9ff center/60% no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%237447d6' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M5 7c5-2 8 0 11 3v17c-3-3-6-5-11-3V7ZM27 7c-5-2-8 0-11 3v17c3-3 6-5 11-3V7Z'/%3E%3C/svg%3E");
}
.home-page .content-pathways article:nth-child(2)::before {
  background-color: #eef2f6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%234b627a' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M9 4h10l6 6v18H9V4Z'/%3E%3Cpath d='M19 4v7h6M13 16h8M13 21h8'/%3E%3C/svg%3E");
}
.home-page .content-pathways article::after {
  content: "→";
  color: #0a74f5;
  font-size: 1.2rem;
  font-weight: 850;
}
.home-page .content-pathways article h2,
.home-page .content-pathways article p { grid-column: 2; margin: 0; }
.home-page .content-pathways article h2 { grid-row: 1; align-self: end; font-size: 1.05rem; }
.home-page .content-pathways article p { grid-row: 2; align-self: start; font-size: .82rem; color: #536b84; }
.home-page .content-pathways article::before { grid-row: 1 / span 2; }
.home-page .content-pathways article::after { grid-column: 3; grid-row: 1 / span 2; }

@media (max-width: 620px) {
  .home-page .content-pathways { grid-template-columns: 1fr; }
}
