/* Halaman artikel: bagian atas = gaya detail artikel (dipakai [slug].astro), bagian bawah = daftar artikel (prefix al-). */
.editorial-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 64px) 0 clamp(100px, 14vw, 190px);
  animation: editorial-arrive 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.article-detail {
  animation: editorial-arrive 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes editorial-arrive {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.editorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  gap: 34px 8vw;
  align-items: end;
  padding-bottom: clamp(70px, 11vw, 150px);
}
.page-kicker {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}
.page-title {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(62px, 10vw, 150px);
  line-height: 0.84;
  letter-spacing: -0.09em;
  font-weight: 500;
}
.page-title em {
  color: var(--blue);
  font-style: normal;
}
.editorial-lede {
  max-width: 390px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.4;
}
.article-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 80px) 0;
}
.article-detail-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 60px;
}
.article-detail h1 {
  max-width: 850px;
  margin: 30px 0;
  font-size: clamp(58px, 9vw, 128px);
  line-height: 0.85;
  letter-spacing: -0.09em;
  font-weight: 500;
}
.article-detail-excerpt {
  max-width: 580px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}
.article-detail-meta {
  margin-top: 32px;
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article-body {
  max-width: 680px;
  margin: 70px auto 0;
  font-size: 18px;
  line-height: 1.65;
}
.article-body h2 {
  margin-top: 2.5em;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.06em;
}
.article-body blockquote {
  margin-inline: 0;
  padding-left: 24px;
  border-left: 2px solid var(--blue);
  color: var(--muted);
  font-size: 24px;
}
/* judul/teks panjang tanpa spasi: pecah baris, jangan menembus layout */
.article-detail,
.article-detail > *,
.article-detail-head > *,
.article-body,
.article-body > * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-detail h1 {
  font-size: clamp(40px, 8vw, 112px);
}
.article-body img,
.article-body video,
.article-body iframe {
  max-width: 100%;
  height: auto;
}
.article-body pre,
.article-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
@media (max-width: 720px) {
  .editorial-page {
    padding-inline: 0;
  }
  .editorial-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-detail h1 {
    font-size: clamp(36px, 11vw, 64px);
  }
  .article-body h2 {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body::before,
  .brand-capsule {
    animation: none;
  }
}

/* ============================================================
   Daftar artikel (/artikel/). Prefix al-.
   Variabel warna dari global.css.
   ============================================================ */
.al {
  --al-grad: linear-gradient(90deg, var(--blue), var(--teal) 55%, var(--green));
  --al-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 1360px;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 64px) 0 clamp(90px, 12vw, 170px);
  overflow-x: clip;
  animation: al-arrive 0.8s var(--al-ease) both;
}
@keyframes al-arrive {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes al-up {
  from {
    transform: translateY(112%);
  }
  to {
    transform: none;
  }
}
.al h1,
.al h2,
.al p,
.al li {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- hero ---------- */
.al-title {
  margin: 0;
  font-size: clamp(44px, 11.5vw, 180px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.08em;
}
.al-ln {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.al-ln > span {
  display: block;
  animation: al-up 1s var(--al-ease) both;
  animation-delay: var(--d, 0.1s);
}
.al-title em {
  background: var(--al-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}
.al-lede {
  max-width: 28em;
  margin: clamp(20px, 3vw, 40px) 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.45;
}

/* ---------- artikel utama ---------- */
.al-feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 28px;
  align-items: end;
  margin-top: clamp(64px, 9vw, 130px);
  color: var(--fg);
  text-decoration: none;
}
.al-ph {
  position: relative;
  grid-column: 1 / span 7;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--line);
  aspect-ratio: 3 / 2;
}
.al-ph::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--al-grad);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--al-ease);
}
.al-ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transition:
    filter 0.7s ease,
    transform 1s var(--al-ease);
}
.al-feature:hover .al-ph img,
.al-row:hover .al-ph img {
  filter: none;
  transform: scale(1.03);
}
.al-feature:hover .al-ph::after,
.al-row:hover .al-ph::after {
  transform: none;
}
.al-ft {
  grid-column: 9 / -1;
  display: grid;
  gap: 18px;
  min-width: 0;
}
.al-feature--solo .al-ft {
  grid-column: 1 / span 9;
}
.al-ft-title {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 64px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-wrap: balance;
  transition: color 0.3s;
}
.al-feature:hover .al-ft-title {
  color: var(--teal);
}
.al-sum {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
}
.al-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.al-meta b {
  color: var(--teal);
  font-weight: 500;
}

/* ---------- artikel lainnya ---------- */
.al-rows {
  margin: clamp(64px, 9vw, 130px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.al-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(140px, 18vw, 260px);
  gap: 24px clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(22px, 2.8vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  transition:
    padding 0.45s var(--al-ease),
    color 0.3s;
}
.al-row:not(:has(.al-ph)) {
  grid-template-columns: minmax(0, 1fr);
}
.al-row::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--al-grad);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--al-ease);
}
.al-row:hover {
  padding-left: 12px;
  color: var(--teal);
}
.al-row:hover::after {
  transform: none;
}
.al-row-body {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.al-row-title {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 50px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}
.al-row .al-ph {
  grid-column: auto;
  grid-row: 1;
  grid-column: 2;
  aspect-ratio: 4 / 3;
}
.al-row:hover .al-sum {
  color: var(--muted);
}

/* ---------- kosong ---------- */
.al-empty {
  margin-top: clamp(64px, 9vw, 130px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line-strong);
}
.al-empty p {
  max-width: 15em;
  margin: 0;
  font-size: clamp(30px, 4.6vw, 68px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.06em;
  text-wrap: balance;
}
.al-empty p span {
  color: var(--muted);
}

/* ---------- animasi masuk (hanya jika JS aktif) ---------- */
.al-js .al-rv {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s var(--al-ease),
    transform 1s var(--al-ease);
}
.al-js .al-rv.in {
  opacity: 1;
  transform: none;
}

:root[data-theme="dark"] .al-ph img {
  filter: grayscale(1) brightness(0.82);
}
:root[data-theme="dark"] .al-feature:hover .al-ph img,
:root[data-theme="dark"] .al-row:hover .al-ph img {
  filter: brightness(0.95);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .al-ph,
  .al-ft,
  .al-feature--solo .al-ft {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .al-row,
  .al-row:not(:has(.al-ph)) {
    grid-template-columns: minmax(0, 1fr);
  }
  .al-row .al-ph {
    grid-column: 1;
    grid-row: 1;
  }
  .al-row:hover {
    padding-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al,
  .al-ln > span {
    animation: none;
  }
  .al-js .al-rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .al-row,
  .al-row::after,
  .al-ph img,
  .al-ph::after {
    transition: none;
  }
}
