/* cl-home.css: the home in corsaperformance.com's look, measured in their 1440 window and 390 phone stage:
   the dark boxed hero, the grid of four tiles, the scrolling row of tall cards, the page's heading, the dark
   box of cards and the three promises. Square boxes; text over a photo sits
   on a darkening wash. Every rule sits in @layer site (cl-site.css: the layer order). */
@layer base, kit, site;

@layer site {

/* the hero's first slide: a 500px photo boxed on the near-black band */
.cl-hero { background: var(--site-dark); padding-bottom: 56px; }
.cl-hero__box { position: relative; height: 500px; overflow: hidden; }
.cl-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cl-hero__box::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.cl-hero__text { position: absolute; z-index: 1; left: 72px; bottom: 72px; max-width: 494px; color: #FFFFFF; }
.cl-hero__title { font: 600 48px/52.8px var(--site-font-heading); letter-spacing: -0.96px; }
.cl-hero__btn { margin-top: 32px; }

/* the vehicle band at the height of their Search Your Vehicle strip, with a search box under it on phones */
.cl-home .cl-search { padding-top: 38px; }
.cl-search__find { display: none; }

/* the four tiles: one tall, two squares, one wide */
.cl-tiles { padding: 64px var(--site-gutter); }
.cl-tiles__grid { max-width: 1230px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 288px; gap: 24px; }
.cl-tiles__item:first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
.cl-tiles__item:last-child { grid-column: 3 / 5; }
.cl-tile, .cl-card, .cl-box__card { position: relative; display: block; height: 100%; overflow: hidden; background: #000000; }
.cl-tile img, .cl-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: transform 0.4s ease; }
.cl-tile:hover img, .cl-card:hover img, .cl-box__card:hover img { transform: scale(1.04); }
.cl-tile__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; color: #FFFFFF; font: 600 24px/31.2px var(--site-font-heading); letter-spacing: -0.48px; text-align: center; }

/* a section's heading with its Shop All link at the right */
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.cl-head__title { font: 600 40px/44px var(--site-font-heading); letter-spacing: -0.8px; }
.cl-head__all { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; font: 500 16px/25.6px var(--site-font-body); }
.cl-head__all svg { box-sizing: content-box; width: 6px; padding: 7px 9px; background: var(--site-chip); }
.cl-head__all:hover { text-decoration: underline; text-underline-offset: 4px; }

/* the scrolling row of tall cards, bleeding to the window's right edge */
.cl-row { padding-bottom: 64px; }
.cl-row__track { display: grid; grid-auto-flow: column; grid-auto-columns: 432px; gap: 24px; padding: 0 var(--site-gutter); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--site-gutter); scrollbar-width: none; max-width: var(--site-max); margin: 0 auto; }
.cl-row__track::-webkit-scrollbar { display: none; }
.cl-row__track li { height: 540px; scroll-snap-align: start; }
.cl-card__label { position: absolute; left: 48px; right: 48px; bottom: 48px; color: #FFFFFF; font: 600 20px/28px var(--site-font-heading); letter-spacing: -0.4px; }
.cl-row__bar { display: flex; align-items: center; gap: 16px; margin-top: 40px; }
.cl-row__line { flex: 1; height: 2px; margin-right: 24px; background: var(--site-chip); }
.cl-row__progress { display: block; height: 2px; width: 30%; background: var(--site-fg); }
.cl-row__btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--site-line); color: var(--site-fg); }
.cl-row__btn:hover { border-color: var(--site-fg); }

/* the page's heading */
.cl-about__title { font: 600 48px/52.8px var(--site-font-heading); letter-spacing: -0.96px; }
.cl-about { padding-bottom: 39px; }

/* the dark box of cards, where their blog posts sit */
.cl-box { padding-bottom: 64px; }
.cl-box__in { min-height: 652px; padding: 56px 72px; background: var(--site-dark); color: var(--site-on-dark); }
.cl-box .cl-head { min-height: 94px; align-items: flex-end; margin-bottom: 47px; }
.cl-box .cl-head__all svg { background: rgba(242, 242, 242, 0.1); }
.cl-box__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 347px)); column-gap: 24px; justify-content: space-between; align-items: start; }
.cl-box__card { height: auto; background: none; }
.cl-box__card img { width: 100%; height: auto; transition: transform 0.4s ease; }
.cl-box__label { display: block; margin-top: 25px; font: 600 28px/33.6px var(--site-font-heading); letter-spacing: -0.56px; }

/* the three promises */
.cl-promise { padding-bottom: 64px; }
.cl-promise__list { min-height: 176px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.cl-promise__item svg { margin: 0 auto; }
.cl-promise__title { margin-top: 20px; font: 600 24px/31.2px var(--site-font-heading); letter-spacing: -0.48px; }
.cl-promise__text { margin-top: 24px; }
.cl-promise__text a:hover { text-decoration: underline; }

/* ---------- phones: their 390 stage ---------- */
@media (max-width: 979.98px) {
  .cl-hero { padding-bottom: 32px; }
  .cl-hero .cl-wrap { padding: 0 20px; }
  .cl-hero__box { height: 480px; }
  .cl-hero__text { left: 20px; right: 20px; bottom: 60px; }
  .cl-hero__title { font-size: 28px; line-height: 30.8px; letter-spacing: -0.56px; }
  .cl-hero__btn { margin-top: 24px; min-height: 54px; padding: 0 28px; font-size: 14px; }

  .cl-home .cl-search { min-height: 400px; padding-top: 7px; }
  .cl-search__find { display: block; margin-top: 28px; }
  .cl-search__find input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--site-find-line); border-radius: var(--site-radius); background: var(--site-find-bg); color: var(--site-fg); font: 500 16px/1 var(--site-font-body); }
  .cl-search__find input::placeholder { color: var(--site-fg); opacity: 1; }

  .cl-tiles { padding: 32px var(--site-gutter); }
  .cl-tiles__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 310px 150px 150px; grid-auto-rows: 150px; gap: 10px; }
  .cl-tiles__item:first-child { grid-column: 1 / 3; grid-row: auto; }
  .cl-tiles__item:last-child { grid-column: 1 / 3; }
  .cl-tile__label { font-size: 18px; line-height: 23.4px; }

  .cl-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 24px; }
  .cl-head__title { font-size: 24px; line-height: 26.4px; letter-spacing: -0.48px; }
  .cl-head__all { font-size: 14px; }

  .cl-row { padding-bottom: 32px; }
  .cl-row__track { grid-auto-columns: 289px; gap: 16px; }
  .cl-row__track li { height: 356px; }
  .cl-card__label { left: 20px; right: 20px; bottom: 20px; font-size: 16px; line-height: 22.4px; }
  .cl-row__bar { margin-top: 24px; }
  .cl-row__line { margin-right: 0; }
  .cl-row__btn { display: none; }

  .cl-about { padding-bottom: 32px; }
  .cl-about__title { font-size: 28px; line-height: 30.8px; letter-spacing: -0.56px; }

  .cl-box { padding-bottom: 0; }
  .cl-box .cl-wrap { padding: 0; }
  .cl-box__in { min-height: 528px; padding: 32px 0; }
  .cl-box .cl-head { min-height: 0; align-items: flex-start; gap: 17px; padding: 39px 20px 0; margin-bottom: 33px; }
  .cl-box__grid { justify-content: start; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 277px; gap: 16px; padding: 0 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
  .cl-box__grid::-webkit-scrollbar { display: none; }
  .cl-box__grid li { scroll-snap-align: start; }
  .cl-box__label { margin-top: 16px; font-size: 22px; line-height: 26.4px; letter-spacing: -0.44px; }

  .cl-promise { padding: 32px 0; }
  .cl-promise__list { min-height: 193px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100%; gap: 0; padding: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cl-promise__list::-webkit-scrollbar { display: none; }
  .cl-promise__item { padding: 0 20px; scroll-snap-align: start; }
  .cl-promise__title { font-size: 18px; line-height: 23.4px; }
  .cl-promise__text { margin-top: 20px; font-size: 14px; line-height: 22.4px; }
}

}
