/* cl-home.css: the home in realtruck.com's look (templates/home.html), every box from review/pages/home.json:
   panels the site's content width (--site-wide inside the --site-gutter on each side) with 48px between them, their
   near-black bands, their yellow, the condensed brand face for the big headings. Desktop from 980px, their 390 phone
   layout below. Every rule sits in @layer site. */
@layer base, kit, site;

@layer site {

.cl-home { --gap: 48px; --wide: min(var(--site-wide), 100% - 2 * var(--site-gutter)); }
.cl-h2 { font: 900 48px/48px var(--site-font-heading); text-transform: uppercase; }
.cl-h2 span, .cl-hero__h span { color: var(--site-yellow); }

/* the hero: a still of their opening film, our heading and the kit's vehicle band */
.cl-hero { position: relative; width: var(--wide); height: 550px; margin: var(--gap) auto 0; overflow: hidden; background: var(--site-dark); }
.cl-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cl-hero::after { content: ""; position: absolute; inset: 0; background: rgba(30, 30, 30, .2); pointer-events: none; }
.cl-hero__text { position: absolute; z-index: 1; left: 48px; bottom: 48px; width: 576px; max-width: calc(100% - 96px); color: var(--site-dark-fg); }
.cl-hero__h { font: 900 48px/48px var(--site-font-heading); text-transform: uppercase; }
.cl-hero__h span { display: block; }
.cl-hero__band { margin-top: 24px; }

/* the shop panel and its yellow strip */
.cl-shopband { width: var(--wide); margin: 0 auto; padding: 48px 0; }
.cl-shopband__row { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: center; margin-bottom: 7px; }
.cl-shopband__img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cl-shopband__lead { margin-top: 16px; font: 700 30px/30px var(--site-font-body); }
.cl-shopband__p { margin-top: 8px; font: 400 16px/24px var(--site-font-body); }
.cl-shopband__text .cl-btn { margin-top: 32px; }
.cl-strip-links { min-height: 82px; display: flex; justify-content: center; align-items: center; gap: 64px; background: var(--site-yellow); color: var(--site-button-fg); }
.cl-strip-links a { display: flex; align-items: center; gap: 16px; font: 700 24px/36px var(--site-font-body); }
.cl-strip-links a:hover span { text-decoration: underline; }
.cl-strip-links img { width: 50px; height: 50px; }

/* the dark parts section: a card for each of our parts, its photo and its count */
.cl-parts { margin-top: var(--gap); padding: 48px 0; background: var(--site-dark); color: var(--site-dark-fg); }
.cl-parts > * { width: var(--wide); margin-left: auto; margin-right: auto; }
.cl-parts__h { text-align: center; margin-bottom: 32px; }
.cl-parts__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cl-pcard { display: flex; flex-direction: column; }
.cl-pcard img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--site-plate); }
.cl-pcard__h { margin-top: 24px; font: 900 48px/48px var(--site-font-heading); text-transform: uppercase; }
.cl-pcard__p { margin-top: 8px; font: 700 16px/24px var(--site-font-body); }
.cl-pcard:hover .cl-pcard__h { text-decoration: underline; }

/* the service cards, where their best-sellers were */
.cl-service { width: var(--wide); margin: 0 auto; padding: 48px 0 96px; }
.cl-service__h { margin-bottom: 16px; }
.cl-service__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cl-scard { display: flex; flex-direction: column; }
.cl-scard__icon { height: 206px; display: grid; place-items: center; background: var(--site-card); color: var(--site-fg); }
.cl-scard__h { margin-top: 12px; font: 700 16px/20px var(--site-font-body); }
.cl-scard__p { margin-top: 8px; font: 400 16px/24px var(--site-font-body); overflow-wrap: anywhere; }
.cl-scard:hover .cl-scard__h { text-decoration: underline; }

/* ---------- phones: their 390 layout, 16px gutters ---------- */
@media (max-width: 979.98px) {
  .cl-home { --gap: 16px; }
  .cl-hero { height: auto; margin: 16px auto 0; background: var(--site-bg); overflow: visible; }
  .cl-hero::after { display: none; }
  .cl-hero__media { position: static; width: 100%; height: auto; aspect-ratio: 1; }
  .cl-hero__text { position: static; width: auto; max-width: none; margin-top: 7px; color: var(--site-fg); }
  .cl-hero__h span { color: var(--site-fg); }
  .cl-hero__band { margin-top: 16px; }

  .cl-shopband { width: auto; padding: 16px 0 6px; }
  .cl-shopband__row { grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 0 var(--site-gutter) 16px; text-align: center; }
  .cl-shopband__lead { font-size: 24px; line-height: 24px; }
  .cl-shopband__text .cl-btn { margin-top: 16px; }
  .cl-strip-links { padding: 16px; flex-direction: column; gap: 4px; }
  .cl-strip-links a { min-height: 50px; }

  .cl-parts { padding: 32px 0 48px; }
  .cl-parts__h { margin-bottom: 16px; }
  .cl-parts__cards { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .cl-pcard__h { margin-top: 12px; font-size: 30px; line-height: 30px; }
  .cl-pcard__p { margin-top: 4px; }

  .cl-service { padding: 32px 0 48px; }
  .cl-service__cards { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .cl-scard__icon { height: 120px; }
}

}
