/* ==========================================================================
   Layout archetype: MAGAZINE SPLIT 2 KOLOM  (Cakra, Tinta)
   Editorial reading layout — a large lead feature + secondary features in the
   main column, an opinion/analysis/quote rail beside it, then a feature grid.
   Reading-first, generous whitespace, serif-forward. Fully self-contained under
   .mag-* so it never touches the hero-grid layout (Portal/Garuda unaffected).
   ========================================================================== */

.mag { padding-top: var(--sp-5); }
.mag-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }

/* shared editorial atoms */
.mag-eyebrow { display: inline-block; font-family: var(--font-ui); font-weight: 800; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); margin-bottom: var(--sp-2); }
.mag-byline { font-size: var(--fs-meta); color: var(--c-text-muted); margin: var(--sp-3) 0 0; }
.mag-byline b { color: var(--c-text); font-weight: 700; }
.mag-dek { color: var(--c-text-muted); font-size: 1.06rem; line-height: 1.62; margin: var(--sp-3) 0 0; }

/* ---- Main column ---- */
.mag-main { display: flex; flex-direction: column; gap: var(--sp-5); }
.mag-main > * + * { border-top: 1px solid var(--c-border); padding-top: var(--sp-5); }

.mag-lead__media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--c-surface-2); margin-bottom: var(--sp-4); }
.mag-lead__media img { width: 100%; height: 100%; object-fit: cover; }
.mag-lead__title { font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.12; margin: 0; }
.mag-lead__title a { color: var(--c-text); }
.mag-lead__title a:hover { color: var(--c-primary); text-decoration: none; }
.mag-lead .mag-dek { font-size: 1.15rem; }

/* secondary features: horizontal editorial cards */
.mag-feature { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.mag-feature__media { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 9; background: var(--c-surface-2); }
.mag-feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mag-feature a:hover .mag-feature__media img { transform: scale(1.04); }
.mag-feature__title { font-size: 1.3rem; line-height: 1.2; margin: 0; }
.mag-feature__title a { color: var(--c-text); }
.mag-feature__title a:hover { color: var(--c-primary); text-decoration: none; }
.mag-feature .mag-dek { font-size: .98rem; -webkit-line-clamp: 2; line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Editorial rail ---- */
.mag-rail { display: flex; flex-direction: column; gap: var(--sp-5); }
.mag-block__title { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 2px solid var(--c-accent); }

/* opinion list — author-led, accent edge */
.mag-oplist { display: flex; flex-direction: column; gap: var(--sp-4); }
.mag-oplist li { padding-left: var(--sp-4); border-left: 3px solid var(--c-border); }
.mag-oplist .mag-op__author { font-size: var(--fs-meta); font-weight: 700; color: var(--c-accent); text-transform: uppercase; letter-spacing: .04em; }
.mag-oplist .mag-op__title { font-family: var(--font-display); font-size: 1.02rem; line-height: 1.3; margin: var(--sp-1) 0 0; }
.mag-oplist .mag-op__title a { color: var(--c-text); }

/* compact analysis list */
.mag-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.mag-list li { padding-bottom: var(--sp-3); border-bottom: 1px solid var(--c-border); }
.mag-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.mag-list a { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; color: var(--c-text); }
.mag-list .mag-list__meta { display: block; font-family: var(--font-ui); font-size: var(--fs-meta); color: var(--c-text-muted); margin-top: 2px; }

/* pull quote highlight */
.mag-quote { margin: 0; padding: var(--sp-5); background: var(--c-surface-2); border-left: 4px solid var(--c-accent); border-radius: var(--radius-sm); }
.mag-quote p { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; font-style: italic; margin: 0 0 var(--sp-3); color: var(--c-text); }
.mag-quote cite { font-style: normal; font-size: var(--fs-meta); font-weight: 700; color: var(--c-accent); text-transform: uppercase; letter-spacing: .04em; }

/* ---- Feature grid below the split ---- */
.mag-more { padding-top: var(--sp-6); }
.mag-more-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.mag-card__media { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 9; background: var(--c-surface-2); margin-bottom: var(--sp-3); }
.mag-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mag-card a:hover .mag-card__media img { transform: scale(1.04); }
.mag-card__title { font-size: 1.15rem; line-height: 1.22; margin: 0; }
.mag-card__title a { color: var(--c-text); }
.mag-card__title a:hover { color: var(--c-primary); text-decoration: none; }
.mag-card .mag-dek { -webkit-line-clamp: 2; line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mag-feature a:hover .mag-feature__media img,
  .mag-card a:hover .mag-card__media img { transform: none; }
}

/* ---- tablet ---- */
@media (min-width: 600px) {
  .mag-feature { grid-template-columns: 200px 1fr; align-items: start; }
  .mag-more-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- desktop: the editorial split ---- */
@media (min-width: 900px) {
  .mag-grid { grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr); gap: var(--sp-7); align-items: start; }
  .mag-feature { grid-template-columns: 240px 1fr; }
  .mag-more-grid { grid-template-columns: repeat(3, 1fr); }
  .mag-rail { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
}

/* ==========================================================================
   Magazine character on ARTICLE & CATEGORY pages (this file also loads there
   for Cakra/Tinta; never for Portal/Garuda). Editorial reading polish — shared
   by both magazine brands; per-brand accents live in each child brand.css.
   ========================================================================== */
.article__title { line-height: 1.1; letter-spacing: -.01em; }
.article__header .kicker { font-family: var(--font-ui); }

/* Editorial standfirst: the opening paragraph reads larger, like a magazine lede. */
.article .prose > p:first-of-type { font-size: 1.2rem; line-height: 1.7; color: var(--c-text); }

/* Refined byline / metadata bar. */
.article__meta { gap: var(--sp-2) var(--sp-3); }
.article__author { font-family: var(--font-ui); }
.article__author .avatar { background: var(--c-primary); box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 3px var(--c-accent); }

/* Related posts feel like a curated "Baca juga" rail. */
.related-grid .card__title a { font-family: var(--font-display); }
.related-grid .card__title { font-size: 1.05rem; }

/* ---- tighter, proportional header on small screens (magazine brands only) ---- */
@media (max-width: 600px) {
  :root { --header-h: 54px; }
  .brand img, .brand .custom-logo { height: 34px; }
  .brand__name { font-size: 1.04rem; }
}
