/* cl-home.css: REDARC's home (templates/home.html), from their measurements at 1440 and in the 390 phone stage.
   Every rule sits in @layer site (cl-site.css: the layer order). */
@layer base, kit, site;

@layer site {

/* the ghost button of their tiles: white capitals in a white hairline */
.cl-ghost { display: inline-flex; align-items: center; justify-content: center; width: 210px; height: 45px; border: 1px solid var(--site-on-dark); color: var(--site-on-dark);
  font: 700 16px/21px var(--site-font-button); text-transform: uppercase; transition: background-color 0.2s ease, color 0.2s ease; }
a:hover > .cl-ghost { background: var(--site-on-dark); color: var(--site-dark); }

/* a section heading under their short red rule */
.cl-rule-h { font: 900 30px/42px var(--site-font-heading); text-transform: uppercase; }
.cl-rule-h::before { content: ""; display: block; width: 50px; height: 1px; margin-bottom: 17px; background: var(--site-accent); }

/* the hero: their first slide as a still, the words at the left over the photo */
.cl-hero { display: flex; flex-direction: column; align-items: flex-start; height: 550px; padding: 253px 15px 0; background: var(--site-dark) var(--cl-hero) center / cover no-repeat; color: var(--site-on-dark); }
.cl-hero__h { font: 900 60px/72px var(--site-font-heading); letter-spacing: -1.5px; text-transform: uppercase; }
.cl-hero__sub { margin-top: 24px; font: 900 18px/27px var(--site-font-body); text-transform: uppercase; }
.cl-hero__btn { width: 210px; margin-top: 41px; }

/* the four solution tiles: the photo, their rule, heading and ghost button */
.cl-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cl-tile { background: var(--site-dark) var(--cl-tile) var(--cl-pos, center) / cover no-repeat; }
.cl-tile__a { display: flex; flex-direction: column; align-items: flex-start; height: 240px; padding: 68px 47px 0; color: var(--site-on-dark); }
.cl-tile__h { max-width: 266px; min-height: 87px; font: 900 24px/36px var(--site-font-heading); letter-spacing: 1px; text-transform: uppercase; }
.cl-tile__h::before { content: ""; display: block; width: 50px; height: 1px; margin-bottom: 14px; background: var(--site-on-dark); }
.cl-tile .cl-ghost { margin-top: 10px; max-width: 100%; }

/* our heading, centred */
.cl-intro { max-width: 1192px; margin: 0 auto; padding: 84px 15px 92px; text-align: center; }
.cl-intro__h { font: 900 30px/42px var(--site-font-heading); text-transform: uppercase; }

/* best sellers: four cards, the photo, the name, the part number, the button at the foot */
.cl-sellers { padding: 0 40px 92px; }
.cl-sellers__list { display: grid; grid-template-columns: repeat(4, minmax(0, 318px)); gap: 30px; margin-top: 35px; }
.cl-card { display: flex; flex-direction: column; min-height: 523px; }
.cl-card__img { background: var(--site-photo); }
.cl-card__img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.cl-card__name { margin-top: 8px; font: 700 18px/24px var(--site-font-body); text-transform: uppercase; }
.cl-card__name:hover { color: var(--site-accent); }
.cl-card__sku { margin-top: 8px; font: 500 13px/18px var(--site-font-body); text-transform: uppercase; }
.cl-card__btn { margin-top: auto; width: 100%; }

@media (max-width: 979.98px) {
  /* the kit's band stands where their promotion strip and the hero's top are, so the hero keeps its foot at theirs */
  .cl-hero { height: 249px; padding: 47px 15px 0; background-image: var(--cl-hero-phone); background-position: center 70%; }
  .cl-hero__h { font-size: 30px; line-height: 30px; letter-spacing: -0.75px; }
  .cl-hero__sub { margin-top: 10px; line-height: 18px; }
  .cl-hero__btn { margin-top: 20px; }

  .cl-tiles { grid-template-columns: 1fr; }
  .cl-tile__a { height: 250px; padding: 87px 15px 0; }
  .cl-tile__h { max-width: 220px; min-height: 63px; font-size: 18px; line-height: 31.5px; }
  .cl-tile .cl-ghost { width: 100%; }

  .cl-intro { padding: 53px 15px 46px; }
  .cl-intro__h { font-size: 22px; line-height: 25px; }

  .cl-sellers { padding: 0 0 54px 30px; }
  .cl-rule-h { padding-right: 15px; font-size: 18px; line-height: 24px; }
  .cl-rule-h::before { margin-bottom: 12px; }
  .cl-sellers__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 239px; gap: 14px; margin-top: 36px; padding-right: 30px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cl-sellers__list::-webkit-scrollbar { display: none; }
  .cl-card { min-height: 443px; scroll-snap-align: start; }
}

}
