/* cl-home.css: the home in allballsracing.com's look (templates/home.html), from the capture's measurements of
   their home at 1440 and in the 390px phone stage: the full-width slide, the two videos, the 3-column
   tiles in grey frames, the resource cards under a black rule.
   Every rule sits in @layer site (cl-site.css: the layer order). */
@layer base, kit, site;

@layer site {

.cl-home__hero { display: block; height: 500px; overflow: hidden; background: #000; }
.cl-home__hero img { width: 100%; height: 500px; object-fit: cover; }

.cl-home__h2 { color: var(--site-accent); font: italic 700 30px/36px var(--site-font-heading); text-transform: uppercase; text-align: center; }

/* their Videos block: the red heading, two 628x350 players a row apart on desktop, stacked on phones */
.cl-home__videos { padding-top: 60px; padding-bottom: 22px; }
.cl-home__vids { display: grid; grid-template-columns: repeat(2, 628px); justify-content: space-between; gap: 16px; margin-top: 30px; }
.cl-home__vids iframe { width: 100%; height: 350px; border: 0; }

.cl-home__popular { padding-top: 52px; padding-bottom: 52px; }
.cl-home__head { position: relative; margin-bottom: 30px; }
.cl-home__head .cl-home__h2 { font-size: 32px; }
.cl-home__all { position: absolute; right: 8px; top: 6px; color: var(--site-navy); font: 700 16px/24px var(--site-font-body); }
.cl-home__all:hover { text-decoration: underline; }
.cl-home__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.cl-home__tile { display: block; }
.cl-home__frame { display: block; aspect-ratio: 1; padding: 5px; border: 2px solid var(--site-grey); background: var(--site-photo); }
.cl-home__frame img { width: 100%; height: 100%; object-fit: contain; }
.cl-home__tile h3 { margin-top: 13px; color: var(--site-navy); font: 700 17.6px/32px var(--site-font-heading); text-align: center; }
.cl-home__tile:hover h3 { text-decoration: underline; }

.cl-home__res { padding-top: 22px; padding-bottom: 61px; }
.cl-home__res .cl-home__h2 { margin-bottom: 30px; }
.cl-home__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.cl-home__card { display: flex; gap: 16px; min-height: 161px; padding: 25px 20px 20px; background: var(--site-panel); border-top: 5px solid var(--site-ink); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08); }
.cl-home__icon { flex: none; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: var(--site-accent); color: #fff; }
.cl-home__card h3 { color: var(--site-ink); font: 700 18px/32px var(--site-font-heading); }
.cl-home__card p { color: var(--site-fg); font: 400 15.2px/24px var(--site-font-body); }
.cl-home__card a { display: inline-block; margin-top: 10px; color: var(--site-navy); font: 600 15.2px/19px var(--site-font-body); }
.cl-home__card a:hover { text-decoration: underline; }

@media (max-width: 979.98px) {
  .cl-home__videos { padding: 60px 16px 22px; }
  .cl-home__vids { grid-template-columns: 1fr; }
  .cl-home__popular { padding: 22px 16px 22px; }
  .cl-home__head { margin-bottom: 30px; text-align: center; }
  .cl-home__all { position: static; display: inline-flex; align-items: center; min-height: 40px; margin-top: 12px; }
  .cl-home__tiles { grid-template-columns: 1fr; gap: 20px; }
  .cl-home__res { padding: 22px 16px 54px; }
  .cl-home__cards { grid-template-columns: 1fr; gap: 40px; }
  .cl-home__card a { min-height: 40px; display: inline-flex; align-items: center; margin-top: 0; }
}

}
