/* ==========================================
   BLOG SECTION (homepage) + full-section scroll-snap
   Loaded on index.html only — snapping is scoped to the homepage.
   ========================================== */

/* Lock the page onto each full section along the vertical axis */
html {
  scroll-snap-type: y mandatory;
}

/* Snap points: the hero and each blog panel align their top to the viewport */
.section--hero,
.blog-post {
  scroll-snap-align: start;
}

/* Keep the footer reachable/visible at the very end (align its bottom to the
   viewport bottom) — otherwise mandatory snapping traps it off-screen. */
.site-footer {
  scroll-snap-align: end;
}

/* ---- Blog ---- */
.blog {
  background: #E6E5DF;
}

.blog-post {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 0;               /* horizontal handled by the inner container */
  border-top: 1px solid rgba(23, 23, 21, 0.08);
}

/* Same geometry as the navbar (max-width 1280 + 24px) so the content edges
   line up with the header logo (left) and actions (right). */
.blog-post__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

/* Alternate the image side for visual rhythm */
.blog-post:nth-child(even) .blog-post__media { order: 2; }

.blog-post__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #141414;
}

.blog-post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-post:hover .blog-post__media img { transform: scale(1.04); }

.blog-post__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 520px;
}

.blog-post__cat {
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(23, 23, 21, 0.5);
}

.blog-post__title {
  font-family: var(--font-main);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #171715;
}

.blog-post__excerpt {
  font-family: var(--font-main);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.6;
  color: rgba(23, 23, 21, 0.6);
}

.blog-post__foot {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 6px;
}

.blog-post__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: #171715;
  text-decoration: none;
  border-bottom: 1.5px solid #171715;
  padding-bottom: 2px;
  transition: opacity 0.15s;
}

.blog-post__link:hover { opacity: 0.55; }

.blog-post__date {
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: rgba(23, 23, 21, 0.4);
}

/* ---- Mobile: stack image over text ---- */
@media (max-width: 768px) {
  .blog-post {
    padding: 88px 0 40px;
  }
  .blog-post__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 1rem;             /* match the navbar's mobile edge (16px) */
  }
  .blog-post:nth-child(even) .blog-post__media { order: 0; }
  .blog-post__media { aspect-ratio: 16 / 10; }
  .blog-post__title { font-size: clamp(2rem, 8vw, 2.6rem); }
}

/* Title + image link to the article — title keeps its exact look */
.blog-post__title-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s;
}
.blog-post__title-link:hover { opacity: 0.55; }   /* same as the Read more link */
a.blog-post__media {
  display: block;
}
