/* cl-home.css: the home page in spcalignment.com's look (templates/home.html), from the capture's
   measurements of their home at 1440 and in the 390 phone stage.
   Every rule sits in @layer site (cl-site.css: the layer order); none names a kit class. */
@layer base, kit, site;

@layer site {

.cl-home__in { max-width: var(--site-container); margin: 0 auto; padding: 0 15px; }

/* the hero: their photo, the heading and the vehicle band over its foot */
.cl-home__hero { position: relative; height: 418px; overflow: hidden; background: var(--site-dark); }
.cl-home__photo { width: 100%; height: 100%; object-fit: cover; }
.cl-home__pick { position: absolute; left: 0; right: 0; bottom: 23px; }
.cl-home__h1 { max-width: var(--site-container); margin: 0 auto 8px; padding: 0 15px; color: #FFFFFF; font: 700 32px/36px var(--site-font-heading); text-transform: uppercase; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

/* the row of 4 links */
.cl-home__row { display: grid; grid-template-columns: repeat(4, 1fr); max-width: var(--site-container); margin: 0 auto; padding: 31px 0 28px; }
.cl-home__cell { display: flex; align-items: center; gap: 0; min-height: 83px; padding: 0 12px; color: var(--site-ink); }
.cl-home__cell img { width: 88px; height: 83px; object-fit: contain; }
.cl-home__icon { display: flex; align-items: center; justify-content: center; width: 88px; height: 83px; color: var(--site-accent-ink); }
.cl-home__label { display: flex; flex-direction: column; font: 400 18px/30px var(--site-font-heading); text-transform: uppercase; }
.cl-home__line { color: var(--site-accent-ink); text-transform: none; }
.cl-home__cell:hover .cl-home__label { text-decoration: underline; }
.cl-home__rule { height: 10px; margin: 9px 0 0; border: 0; background: var(--site-accent); }

/* What's New: the first slide of 4 cards */
.cl-home__new { max-width: var(--site-container); margin: 0 auto; padding: 0 15px 40px; }
.cl-home__h2 { font: 400 30px/56px var(--site-font-heading); text-transform: uppercase; color: var(--site-fg); }
.cl-home__cards { display: grid; grid-template-columns: repeat(4, 263px); justify-content: space-between; margin-top: 8px; }
.cl-home__card { display: flex; flex-direction: column; height: 581px; padding: 3px 15px 25px; border: 3px solid var(--site-accent); }
.cl-home__title { min-height: 86px; padding-top: 12px; color: var(--site-accent-ink); font: 400 18px/21.6px var(--site-font-heading); text-transform: uppercase; }
.cl-home__card img { width: 227px; height: 227px; margin: 20px 0 0; object-fit: contain; }
.cl-home__text { margin-top: 40px; font: 400 16px/20px var(--site-font-body); color: var(--site-fg); }
.cl-home__card .cl-btn { align-self: flex-start; margin-top: auto; }

/* the search band on their car photo */
.cl-home__find { padding: 24px 0; min-height: 230px; background: #2A0A0A var(--find) 0% 79% / cover no-repeat; color: #FFFFFF; }
.cl-home__find .cl-home__h2 { color: #FFFFFF; font: 700 32px/38.4px var(--site-font-heading); }
.cl-home__lead { max-width: 637px; min-height: 40px; margin-top: 8px; font: 600 14px/20px var(--site-font-body); color: #FFFFFF; }
.cl-home__search { display: flex; gap: 20px; margin-top: 24px; }
.cl-home__search input { width: 556px; height: 48px; padding: 0 12px; border: 3px solid var(--site-field-rule); border-radius: 0; background: var(--site-field-bg); color: var(--site-ink); font: 400 16px/24px var(--site-font-body); }

@media (max-width: 979.98px) {
  .cl-home__hero { height: auto; margin-bottom: 26px; overflow: visible; }
  .cl-home__photo { height: 113px; }
  .cl-home__pick { position: static; padding: 12px 0 12px; background: var(--site-dark); }
  .cl-home__h1 { margin-bottom: 12px; padding: 0 20px; font-size: 20px; line-height: 24px; }
  /* their four fields stand 180px wide at the band's left, so the kit's band does too until a vehicle is set */
  .cl-home__band--ask { width: 204px; margin-left: 4px; }

  .cl-home__row { grid-template-columns: 1fr; padding: 0 15px 29px; }
  .cl-home__cell { justify-content: center; align-items: flex-start; min-height: 96px; padding: 25px 0 0; }
  .cl-home__cell:nth-child(3) { min-height: 182px; padding-top: 50px; }
  .cl-home__cell:nth-child(4) { min-height: 136px; padding-top: 35px; }
  .cl-home__label { min-height: 71px; justify-content: center; }
  .cl-home__cell img, .cl-home__icon { width: 76px; height: 71px; }
  .cl-home__rule { margin-top: 9px; }

  .cl-home__new { padding: 0 0 40px; }
  .cl-home__new .cl-home__h2 { padding: 0 15px; }
  .cl-home__cards { display: flex; gap: 24px; margin-top: 8px; padding: 0 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cl-home__card { flex: 0 0 366px; max-width: calc(100vw - 24px); height: 624px; scroll-snap-align: center; }
  .cl-home__card img { width: 330px; height: 330px; max-width: 100%; margin-top: 0; }
  .cl-home__text { margin-top: 20px; }

  .cl-home__find { min-height: 506px; padding: 24px 0; }
  .cl-home__find .cl-home__in { padding: 0 20px; }
  .cl-home__find .cl-home__h2 { font-size: 28px; line-height: 30px; }
  .cl-home__find .cl-home__lead { max-width: 230px; }
  .cl-home__lead { max-width: 262px; min-height: 0; margin-top: 6px; }
  .cl-home__search { flex-direction: column; gap: 26px; margin-top: 276px; }
  .cl-home__search input { width: 100%; }
  .cl-home__search .cl-btn { width: 100%; }
}

}
