/* =========================
   Home layout (fast + clean)
   ========================= */

:root {
  --home-max: 1100px;
  --radius: 5px;
  --gap: 22px;
  --shadow-1: 0 10px 24px rgba(0, 0, 0, 0.1);
  --shadow-2: 0 18px 40px rgba(0, 0, 0, 0.22);

  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --main-div-w:        
;
  /* Card Text and Styles */
  --tile-title-bg: rgba(215, 217, 219, 0.92);
  --tile-title-color: #e2e2e2;
  --tile-title-fs: 1.4rem;
  --tile-title-fw: 200;
}

.home {
  max-width: 100%;
  margin: 0 auto;
  /* padding: 0 20px 56px; */
}

.home-header {
  margin-bottom: 18px;
}

.home-title {
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.15;
  margin: 0 0 6px;
}

.home-subtitle {
  margin: 0;
  max-width: 70ch;
  opacity: 0.85;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-bg {
  height: 400px;
  background-image: url("../images/hero-sq.webp");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.hero-card {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.hero-title {
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
}

.hero-title h1 {
  font-size: 2.5rem;
}

.hero-seo-img {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.featured-heading {
  width: 100%;
  color: rgb(45, 45, 45);
  font-weight: 300;
}

.tiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.tile-card {
  position: relative; /* needed for overlay */
  display: block; /* simpler than grid now */
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  text-decoration: none;
  box-shadow: var(--shadow-1);

  transition:
    transform 0.35s var(--ease-smooth),
    box-shadow 0.35s ease;
  will-change: transform;
}

.tile-media {
  background: #8c8c8c; /* placeholder gray */
}

.tile-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  transform: translateZ(0);
}

.tile-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 1.3rem 14px;

  /* translucent background */
  background: rgba(0, 0, 0, 0.25);

  /* blur the image behind */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); /* Safari */
  z-index: 2;
}

.tile-title {
  margin: 0;
  font-size: 16px;
  color: var(--tile-title-color);
  font-size: var(--tile-title-fs);
  font-weight: var(--tile-title-fw);
}

.tile-card:focus-visible,
.hero-card:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.45);
  outline-offset: 3px;
}

/* Hover scale */
@media (hover: hover) {
  .tile-card:hover {
    transform: scale(1.035);
    box-shadow: var(--shadow-2);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tile-card {
    transition: none;
  }
}

@media (min-width: 600px) {
  .tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .tiles-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .tile-media img {
    aspect-ratio: 3 / 4;
  }

  .home {
    max-width: 1100px;
    padding: 0 20px 56px;
  }
  .hero-bg {
    background-image: url("../images/hero-wide.webp");
    background-position: right;
  }
  .hero-title h1 {
    font-size: 3rem;
  }
}
