/* css/articles.css — seksi Artikel & Tips, bahasa visual 20FIT Arena. */

.articles {
  padding: 80px 32px;
  background: var(--bg-alt, #f2efe6);
  border-top: 1px solid var(--line, #e5e1d5);
}
.articles[hidden] { display: none; }

.art-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap; margin-bottom: 44px;
}
.art-head-left { max-width: 680px; }
.art-head h2 {
  font-family: 'Anton', sans-serif; font-weight: 400;
  font-size: clamp(42px, 5.5vw, 78px); line-height: .9;
  letter-spacing: -.01em; margin: 0; color: var(--ink, #0d0d0d);
}
.art-head h2 em {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; font-style: italic; color: var(--red, #b94a3e);
}
.art-lede {
  color: var(--muted, #6a6a66); font-size: 15px; line-height: 1.65;
  margin-top: 18px; max-width: 560px;
}
.art-lede b { color: var(--ink, #0d0d0d); font-weight: 600; }

.art-all {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red, #b94a3e); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color .2s cubic-bezier(.16,1,.3,1), gap .2s cubic-bezier(.16,1,.3,1);
}
.art-all:hover { border-bottom-color: var(--red, #b94a3e); gap: 13px; }
.art-all:focus-visible { outline: 2px solid var(--red, #b94a3e); outline-offset: 3px; }

.art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.art-card {
  display: flex; flex-direction: column;
  background: var(--bg, #fafaf5);
  border: 1px solid var(--line, #e5e1d5); border-radius: 10px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s cubic-bezier(.16,1,.3,1), border-color .22s;
}
.art-card:hover { transform: translateY(-4px); border-color: var(--ink, #0d0d0d); box-shadow: 0 22px 45px -24px rgba(13,13,13,.5); }
.art-card:focus-visible { outline: 2px solid var(--red, #b94a3e); outline-offset: 3px; }

.art-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line, #e5e1d5); }
.art-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.art-card:hover .art-thumb img { transform: scale(1.04); }
.art-cat {
  position: absolute; top: 12px; left: 12px;
  background: var(--red, #b94a3e); color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 4px;
}

.art-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.art-date {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: .1em; color: var(--muted, #6a6a66);
}
.art-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 21px; line-height: 1.12; letter-spacing: .01em;
  text-transform: uppercase; color: var(--ink, #0d0d0d); margin: 0;
}
.art-excerpt {
  font-size: 13.5px; line-height: 1.6; color: var(--muted, #6a6a66); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.art-more {
  margin-top: auto; padding-top: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red, #b94a3e); display: inline-flex; align-items: center; gap: 7px;
  transition: gap .2s cubic-bezier(.16,1,.3,1);
}
.art-card:hover .art-more { gap: 12px; }

/* Rangka muat — tinggi sama dengan kartu asli supaya tidak ada layout shift. */
.art-skeleton { pointer-events: none; }
.art-skeleton .art-thumb,
.art-skeleton .art-line { background: var(--line, #e5e1d5); animation: art-pulse 1.4s ease-in-out infinite; }
.art-skeleton .art-line { height: 12px; border-radius: 3px; }
.art-skeleton .art-line--sm { width: 38%; height: 9px; }
.art-skeleton .art-line--lg { width: 88%; height: 18px; }
@keyframes art-pulse { 50% { opacity: .45; } }

@media (max-width: 1024px) { .art-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) {
  .articles { padding: 60px 20px; }
  .art-head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 30px; }
  .art-head h2 { font-size: 40px; }
  .art-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .art-card, .art-thumb img, .art-more, .art-all { transition: none !important; }
  .art-card:hover { transform: none; }
  .art-skeleton .art-thumb, .art-skeleton .art-line { animation: none; }
}
