/* Four Degree North — Articles Archive Page
   Refreshed card grid layout with scroll-driven depth
   Uses same design tokens as styles.css
   ──────────────────────────────────────────────────── */

/* ── Articles Hero ────────────────────────────────── */
.articles-hero {
  position: relative;
  min-height: 54vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header) + var(--section-block)) var(--shell) var(--xxl);
  background: var(--ink);
  overflow: hidden;
}

.articles-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(236,31,51,0.1), transparent 28%),
    radial-gradient(circle at 70% 60%, rgba(255,250,240,0.05), transparent 32%);
  pointer-events: none;
}

.articles-hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

.articles-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  color: var(--red);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.articles-hero__kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.articles-hero__title {
  margin: 0;
  color: rgba(255,250,240,0.94);
  font-family: var(--serif);
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.articles-hero__lead {
  max-width: 38ch;
  margin: 1.35rem 0 0;
  color: rgba(255,250,240,0.66);
  font-size: var(--fs-body);
  line-height: 1.8;
}

.articles-hero__line {
  position: relative;
  width: 100%;
  max-width: var(--content-max);
  margin: var(--xxl) auto 0;
  height: 1px;
  background: rgba(255,250,240,0.12);
}

.articles-hero__line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(var(--line-progress, 0));
  transform-origin: left;
}

/* ── Archive Grid — Card-based layout ────────────── */
.articles-archive {
  padding: var(--section-block) var(--shell);
}

.articles-archive__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.articles-archive__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--lg);
}

.articles-archive__card {
  border-bottom: none;
  padding-bottom: 0;
}

.articles-archive__link {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--paper-warm);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.articles-archive__link:hover {
  opacity: 1;
  transform: translateY(-6px);
  border-color: var(--red);
  box-shadow: 0 20px 48px rgba(20,18,15,0.08);
}

.articles-archive__link:hover .articles-archive__image {
  transform: scale(1.06);
}

.articles-archive__image-wrap {
  --mask-top: 0;
  --mask-side: 0;
  --image-scale: 1;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.articles-archive__image {
  --parallax-y: 0px;
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center calc(50% + var(--parallax-y));
  filter: saturate(0.92) contrast(1.02);
  transform: scale(1.02);
  transform-origin: center;
  transition: transform 0.7s var(--ease-out);
}

.articles-archive__body {
  display: flex;
  flex-direction: column;
  padding: var(--xl);
}

.articles-archive__category {
  display: inline-block;
  margin-bottom: var(--sm);
  color: var(--red);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.articles-archive__title {
  margin: 0 0 var(--base);
  font-family: var(--serif);
  font-size: var(--fs-subheading);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.35s var(--ease-out);
}

.articles-archive__link:hover .articles-archive__title {
  color: var(--red);
}

.articles-archive__excerpt {
  margin: 0 0 var(--lg);
  color: var(--ink-soft);
  font-size: var(--fs-body);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.articles-archive__meta {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--base);
  border-top: 1px solid var(--line);
}

.articles-archive__meta span {
  color: var(--ink-faint);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── CTA Section ──────────────────────────────────── */
.articles-cta {
  padding: calc(var(--section-block) * 1.5) var(--shell);
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.articles-cta__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) auto;
  gap: var(--xxl);
  align-items: end;
}

.articles-cta__copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-title);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.articles-cta__copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-body);
  line-height: 1.8;
}

.articles-cta__copy p:last-child {
  margin-top: 1rem;
}

.articles-cta__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 980px) {
  .articles-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .articles-cta__inner {
    grid-template-columns: 1fr;
  }

  .articles-cta__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .articles-hero {
    min-height: 42vh;
    padding-top: calc(var(--header) + 3rem);
  }

  .articles-hero__title {
    font-size: clamp(2.8rem, 12vw, 4.8rem);
  }

  .articles-archive__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .articles-archive__meta {
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* ── Large Screen Cap ────────────────────────────── */
@media (min-width: 1441px) {
  .articles-hero {
    padding-left: max(var(--shell), calc((100vw - 1440px) / 2 + var(--shell)));
    padding-right: max(var(--shell), calc((100vw - 1440px) / 2 + var(--shell)));
  }

  .articles-archive {
    padding-left: max(var(--shell), calc((100vw - 1440px) / 2 + var(--shell)));
    padding-right: max(var(--shell), calc((100vw - 1440px) / 2 + var(--shell)));
  }

  .articles-cta {
    padding-left: max(var(--shell), calc((100vw - 1440px) / 2 + var(--shell)));
    padding-right: max(var(--shell), calc((100vw - 1440px) / 2 + var(--shell)));
  }
}
