/*
 * Evolve Kamado — blog index
 *
 * Same register as the article layout and the homepage: a 1440px container, Montserrat
 * throughout, heavy uppercase headings with tight tracking, black on white, and the acid
 * green used only on the one active element per view. Card radius and the grid rhythm
 * follow the shop's product cards so the archive reads as part of the same site.
 */

.ek-blog {
  --ek-ink: #000000;
  --ek-paper: #ffffff;
  --ek-acid: #00be59;
  --ek-ash: #6b6b6b;
  --ek-rule: #e6e6e6;

  --ek-container: 1440px;
  --ek-pad: clamp(20px, 4vw, 32px);
  --ek-font: var(--font-body, "Montserrat", sans-serif);

  background: var(--ek-paper);
  color: var(--ek-ink);
  font-family: var(--ek-font);

  /* No bottom padding: the closing CTA is a full-bleed black band and the last thing in
     here, so any padding after it shows as a white strip above the footer. */
  padding-bottom: 0;
}

.ek-blog .ek-wrap {
  width: 100%;
  max-width: var(--ek-container);
  margin: 0 auto;
  padding-left: var(--ek-pad);
  padding-right: var(--ek-pad);
  box-sizing: border-box;
}

/* ---------------------------------------------------------------- head -- */

.ek-blog__head {
  padding-top: clamp(32px, 4.5vw, 64px);
  padding-bottom: clamp(28px, 3.5vw, 48px);
}

.ek-blog__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ek-ash);
  margin: 0 0 14px;
}

.ek-blog__title {
  font-family: var(--ek-font);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.2rem + 4vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 clamp(14px, 1.6vw, 22px);
  text-wrap: balance;
}

.ek-blog__stand {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.5;
  color: #333333;
  max-width: 62ch;
  margin: 0;
}

.ek-blog__empty {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ek-ash);
  padding: clamp(32px, 5vw, 64px) 0;
}

/* --------------------------------------------------------------- cards -- */

.ek-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 2.4vw, 40px);
  margin-top: clamp(32px, 4vw, 56px);
}

.ek-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.ek-card__media {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f2f2;
  aspect-ratio: 16 / 10;
}

.ek-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ek-card:hover .ek-card__media img {
  transform: scale(1.03);
}

.ek-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ek-ash);
}

.ek-card__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ek-acid);
  flex: none;
}

.ek-card__title {
  font-family: var(--ek-font);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.ek-card__title a {
  color: inherit;
  text-decoration: none;
}

.ek-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ek-card__excerpt {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: #4a4a4a;
  margin: 0;
}

/* Reads as a link but is not one: the whole title is the link, so a second tab stop to
   the same URL would only add noise for keyboard and screen-reader users. */
.ek-card__more {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ek-ink);
  border-bottom: 2px solid var(--ek-acid);
  align-self: flex-start;
  padding-bottom: 2px;
}

/* ---------------------------------------------------------------- lead -- */

.ek-card--lead {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  padding-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--ek-rule);
}

.ek-card--lead .ek-card__media {
  aspect-ratio: 3 / 2;
}

.ek-card--lead .ek-card__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ek-card--lead .ek-card__title {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.ek-card--lead .ek-card__excerpt {
  font-size: 1.0625rem;
}

/* ---------------------------------------------------------- pagination -- */

.ek-blog__pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding-top: clamp(36px, 4.5vw, 64px);
}

.ek-blog__pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 100px;
  background: #f2f2f2;
  color: var(--ek-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ek-blog__pagination .page-numbers:hover {
  background: var(--ek-acid);
}

.ek-blog__pagination .page-numbers.current {
  background: var(--ek-ink);
  color: var(--ek-acid);
}

/* ----------------------------------------------------------------- cta -- */

.ek-blog__cta {
  margin-top: clamp(48px, 6vw, 88px);
  background: var(--ek-ink);
  color: var(--ek-paper);
  padding: clamp(32px, 4vw, 56px) 0;

  /* The footer is black too, so without a rule the CTA and the footer read as one
     undivided block. A hairline separates them without reintroducing the white gap. */
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.ek-blog__cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ek-blog__cta-title {
  font-family: var(--ek-font);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.ek-blog__cta-text {
  font-size: 1rem;
  font-weight: 500;
  color: #c9c9c9;
  margin: 0;
}

.ek-blog__cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 32px;
  border-radius: 100px;
  background: var(--ek-acid);
  color: var(--ek-ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s ease;
}

.ek-blog__cta-link:hover {
  filter: brightness(1.08);
}

.ek-blog__cta-link:focus-visible {
  outline: 2px solid var(--ek-paper);
  outline-offset: 3px;
}

/* -------------------------------------------------------- breakpoints -- */

@media (max-width: 1023px) {
  .ek-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ek-card--lead {
    grid-template-columns: 1fr;
  }

  .ek-blog__grid {
    grid-template-columns: 1fr;
  }

  .ek-blog__cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ek-card__media img,
  .ek-blog__cta-link {
    transition: none;
  }

  .ek-card:hover .ek-card__media img {
    transform: none;
  }
}
