/*
 * Latina Network — editorial.css
 * Phase 07: category archives, single article, Unscripted format, empty states.
 * All color values reference Phase 01 custom properties via var().
 * --ln-current-accent is set inline per category page.
 * ─────────────────────────────────────────────────────────────────────
 */

/* =========================================================
   SHARED ACCENT UTILITY — set per-page via inline <style>
   ========================================================= */
:root {
	--ln-current-accent: var(--ln-tierra); /* overridden per category */
}

/* =========================================================
   1. CATEGORY ARCHIVE
   ========================================================= */

/* --- Hero image banner --- */
.ln-cat-hero {
	position: relative;
	width: 100%;
	height: clamp(240px, 38vw, 480px);
	overflow: hidden;
	background-color: var(--ln-plum-dark);
}

.ln-cat-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	display: block;
}

.ln-cat-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		transparent 30%,
		rgba(61, 29, 52, 0.72) 100%
	);
}

/* --- Category identity block --- */
.ln-cat-identity {
	padding: var(--ln-space-8) var(--ln-space-6) var(--ln-space-6);
	max-width: var(--ln-max-width-content);
	margin: 0 auto;
}

.ln-cat-identity__number {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-xs);
	font-weight: var(--ln-weight-semibold);
	letter-spacing: var(--ln-tracking-widest);
	text-transform: uppercase;
	color: var(--ln-current-accent);
	display: block;
	margin-bottom: var(--ln-space-2);
}

.ln-cat-identity__name {
	font-family: var(--ln-font-display);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: var(--ln-weight-light);
	line-height: var(--ln-leading-tight);
	letter-spacing: var(--ln-tracking-tight);
	color: var(--ln-plum-dark);
	margin: 0 0 var(--ln-space-3);
	padding-bottom: var(--ln-space-3);
	border-bottom: 2px solid var(--ln-current-accent);
	display: inline-block;
}

.ln-cat-identity__desc {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-md);
	line-height: var(--ln-leading-loose);
	color: var(--ln-color-text-on-light);
	max-width: var(--ln-max-width-prose);
	margin: var(--ln-space-4) 0 0;
}

/* --- Contributor pitch line --- */
.ln-cat-pitch {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-sm);
	color: var(--ln-color-text-muted);
	max-width: var(--ln-max-width-content);
	margin: var(--ln-space-4) auto 0;
	padding: 0 var(--ln-space-6) var(--ln-space-6);
	border-bottom: 1px solid var(--ln-color-border);
}

.ln-cat-pitch a {
	color: var(--ln-current-accent);
	font-weight: var(--ln-weight-medium);
	text-decoration: none;
}

.ln-cat-pitch a:hover {
	text-decoration: underline;
}

/* --- Pinned / featured story --- */
.ln-cat-pinned {
	max-width: var(--ln-max-width-content);
	margin: var(--ln-space-8) auto var(--ln-space-6);
	padding: 0 var(--ln-space-6);
}

.ln-cat-pinned__label {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-xs);
	font-weight: var(--ln-weight-semibold);
	letter-spacing: var(--ln-tracking-widest);
	text-transform: uppercase;
	color: var(--ln-current-accent);
	margin-bottom: var(--ln-space-3);
}

.ln-cat-pinned__card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--ln-space-6);
	background: var(--ln-crema);
	border-left: 4px solid var(--ln-current-accent);
	padding: var(--ln-space-6);
}

@media (max-width: 680px) {
	.ln-cat-pinned__card {
		grid-template-columns: 1fr;
	}
}

.ln-cat-pinned__image {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.ln-cat-pinned__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.ln-cat-pinned__title {
	font-family: var(--ln-font-display);
	font-size: var(--ln-text-2xl);
	font-weight: var(--ln-weight-medium);
	line-height: var(--ln-leading-snug);
	letter-spacing: var(--ln-tracking-tight);
	color: var(--ln-plum-dark);
	margin: 0 0 var(--ln-space-3);
}

.ln-cat-pinned__title a {
	color: inherit;
	text-decoration: none;
}

.ln-cat-pinned__title a:hover {
	color: var(--ln-current-accent);
}

.ln-cat-pinned__pull-quote {
	font-family: var(--ln-font-display);
	font-style: italic;
	font-size: var(--ln-text-lg);
	line-height: var(--ln-leading-normal);
	color: var(--ln-color-text-muted);
	border-left: 2px solid var(--ln-current-accent);
	padding-left: var(--ln-space-4);
	margin: var(--ln-space-3) 0;
}

.ln-cat-pinned__meta {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-sm);
	color: var(--ln-color-text-muted);
	margin-top: var(--ln-space-3);
}

.ln-cat-pinned__read {
	display: inline-block;
	margin-top: var(--ln-space-4);
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-sm);
	font-weight: var(--ln-weight-semibold);
	letter-spacing: var(--ln-tracking-wide);
	text-transform: uppercase;
	color: var(--ln-current-accent);
	text-decoration: none;
}

.ln-cat-pinned__read:hover {
	text-decoration: underline;
}

/* --- Category feed grid --- */
.ln-cat-feed {
	max-width: var(--ln-max-width-content);
	margin: var(--ln-space-6) auto var(--ln-space-12);
	padding: 0 var(--ln-space-6);
}

.ln-cat-feed__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--ln-space-6);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* --- Feed card --- */
.ln-cat-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-top: 3px solid var(--ln-current-accent);
	transition: box-shadow 0.18s ease;
}

.ln-cat-card:hover {
	box-shadow: 0 4px 18px rgba(61, 29, 52, 0.10);
}

.ln-cat-card__image-wrap {
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.ln-cat-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.28s ease;
}

.ln-cat-card:hover .ln-cat-card__image {
	transform: scale(1.03);
}

.ln-cat-card__body {
	padding: var(--ln-space-4);
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ln-cat-card__title {
	font-family: var(--ln-font-display);
	font-size: var(--ln-text-lg);
	font-weight: var(--ln-weight-medium);
	line-height: var(--ln-leading-snug);
	color: var(--ln-plum-dark);
	margin: 0 0 var(--ln-space-2);
}

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

.ln-cat-card__title a:hover {
	color: var(--ln-current-accent);
}

.ln-cat-card__excerpt {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-sm);
	color: var(--ln-color-text-muted);
	line-height: var(--ln-leading-normal);
	flex: 1;
	margin-bottom: var(--ln-space-3);
}

.ln-cat-card__meta {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-xs);
	color: var(--ln-color-text-muted);
	margin-top: auto;
}

/* =========================================================
   2. SINGLE ARTICLE
   ========================================================= */

.ln-single {
	max-width: 820px;
	margin: 0 auto;
	padding: 0 var(--ln-space-6) var(--ln-space-12);
}

/* --- Article header --- */
.ln-single__header {
	padding: var(--ln-space-8) 0 var(--ln-space-6);
}

.ln-single__badge {
	display: inline-block;
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-xs);
	font-weight: var(--ln-weight-semibold);
	letter-spacing: var(--ln-tracking-widest);
	text-transform: uppercase;
	color: #fff;
	background-color: var(--ln-current-accent);
	padding: 3px 10px;
	margin-bottom: var(--ln-space-4);
	text-decoration: none;
}

.ln-single__badge:hover {
	opacity: 0.88;
}

.ln-single__headline {
	font-family: var(--ln-font-display);
	font-size: clamp(2rem, 4.5vw, 3.25rem);
	font-weight: var(--ln-weight-medium);
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: var(--ln-plum-dark);
	margin: 0 0 var(--ln-space-4);
}

.ln-single__dek {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-md);
	font-weight: var(--ln-weight-light);
	line-height: var(--ln-leading-normal);
	color: var(--ln-color-text-muted);
	margin: 0 0 var(--ln-space-5);
}

.ln-single__byline {
	display: flex;
	align-items: center;
	gap: var(--ln-space-4);
	flex-wrap: wrap;
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-sm);
	color: var(--ln-color-text-muted);
	border-top: 1px solid var(--ln-color-border);
	padding-top: var(--ln-space-4);
}

.ln-single__byline-author {
	font-weight: var(--ln-weight-medium);
	color: var(--ln-plum-dark);
}

.ln-single__byline-sep {
	color: var(--ln-color-border);
}

/* --- Featured image --- */
.ln-single__image-wrap {
	margin: var(--ln-space-6) calc(-1 * var(--ln-space-6));
}

.ln-single__image {
	width: 100%;
	max-height: 520px;
	object-fit: cover;
	display: block;
}

/* --- Article body typography --- */
.ln-single__body {
	margin-top: var(--ln-space-8);
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-md);
	line-height: var(--ln-leading-loose);
	color: var(--ln-color-text-on-light);
}

.ln-single__body p {
	margin: 0 0 var(--ln-space-5);
}

.ln-single__body h2,
.ln-single__body h3 {
	font-family: var(--ln-font-display);
	color: var(--ln-plum-dark);
	margin: var(--ln-space-8) 0 var(--ln-space-3);
}

.ln-single__body blockquote {
	font-family: var(--ln-font-display);
	font-style: italic;
	font-size: var(--ln-text-xl);
	font-weight: var(--ln-weight-light);
	line-height: var(--ln-leading-snug);
	color: var(--ln-piel-profunda);
	border-left: 3px solid var(--ln-current-accent);
	padding: var(--ln-space-3) 0 var(--ln-space-3) var(--ln-space-5);
	margin: var(--ln-space-6) 0;
}

.ln-single__body blockquote p {
	margin: 0;
}

.ln-single__body a {
	color: var(--ln-current-accent);
	text-decoration-thickness: 1px;
}

/* --- Related posts --- */
.ln-single__related {
	margin-top: var(--ln-space-10);
	padding-top: var(--ln-space-6);
	border-top: 2px solid var(--ln-color-border);
}

.ln-single__related-heading {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-xs);
	font-weight: var(--ln-weight-semibold);
	letter-spacing: var(--ln-tracking-widest);
	text-transform: uppercase;
	color: var(--ln-current-accent);
	margin: 0 0 var(--ln-space-5);
}

.ln-single__related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--ln-space-5);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ln-related-card__image {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	margin-bottom: var(--ln-space-2);
}

.ln-related-card__title {
	font-family: var(--ln-font-display);
	font-size: var(--ln-text-lg);
	font-weight: var(--ln-weight-medium);
	line-height: var(--ln-leading-snug);
	color: var(--ln-plum-dark);
}

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

.ln-related-card__title a:hover {
	color: var(--ln-current-accent);
}

/* =========================================================
   3. UNSCRIPTED FORMAT
   ========================================================= */

.ln-unscripted {
	max-width: var(--ln-max-width-content);
	margin: 0 auto;
	padding-bottom: var(--ln-space-12);
}

/* --- Series label --- */
.ln-unscripted__series {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-xs);
	font-weight: var(--ln-weight-semibold);
	letter-spacing: var(--ln-tracking-widest);
	text-transform: uppercase;
	color: var(--ln-agua-viva);
	text-align: center;
	padding: var(--ln-space-6) var(--ln-space-6) var(--ln-space-2);
}

/* --- Video --- */
.ln-unscripted__video-wrap {
	position: relative;
	width: 100%;
	background: #000;
}

.ln-unscripted__video-wrap video,
.ln-unscripted__video-wrap iframe {
	width: 100%;
	max-height: 75vh;
	display: block;
	aspect-ratio: 16 / 9;
}

/* --- Photo gallery --- */
.ln-unscripted__gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 4px;
	margin: var(--ln-space-6) 0;
	padding: 0 var(--ln-space-6);
}

.ln-unscripted__gallery-item {
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.ln-unscripted__gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.ln-unscripted__gallery-item:hover img {
	transform: scale(1.04);
}

/* --- Profile (written section) --- */
.ln-unscripted__profile {
	max-width: var(--ln-max-width-prose);
	margin: var(--ln-space-8) auto;
	padding: 0 var(--ln-space-6);
}

.ln-unscripted__title {
	font-family: var(--ln-font-display);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: var(--ln-weight-medium);
	letter-spacing: var(--ln-tracking-tight);
	color: var(--ln-plum-dark);
	margin: 0 0 var(--ln-space-4);
}

.ln-unscripted__pull-quote {
	font-family: var(--ln-font-display);
	font-style: italic;
	font-size: var(--ln-text-2xl);
	font-weight: var(--ln-weight-light);
	line-height: var(--ln-leading-snug);
	color: var(--ln-piel-profunda);
	border-left: 3px solid var(--ln-agua-viva);
	padding: var(--ln-space-3) 0 var(--ln-space-3) var(--ln-space-5);
	margin: var(--ln-space-6) 0;
}

.ln-unscripted__body {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-md);
	line-height: var(--ln-leading-loose);
	color: var(--ln-color-text-on-light);
}

.ln-unscripted__body blockquote {
	font-family: var(--ln-font-display);
	font-style: italic;
	font-size: var(--ln-text-xl);
	color: var(--ln-piel-profunda);
	border-left: 3px solid var(--ln-agua-viva);
	padding: var(--ln-space-2) 0 var(--ln-space-2) var(--ln-space-4);
	margin: var(--ln-space-5) 0;
}

.ln-unscripted__body blockquote p {
	margin: 0;
}

.ln-unscripted__meta {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-sm);
	color: var(--ln-color-text-muted);
	margin-top: var(--ln-space-6);
	padding-top: var(--ln-space-4);
	border-top: 1px solid var(--ln-color-border);
}

/* =========================================================
   4. EMPTY STATES
   ========================================================= */

.ln-empty-state {
	text-align: center;
	padding: var(--ln-space-12) var(--ln-space-6);
	max-width: 520px;
	margin: 0 auto;
}

.ln-empty-state__message {
	font-family: var(--ln-font-display);
	font-size: var(--ln-text-2xl);
	font-weight: var(--ln-weight-light);
	color: var(--ln-plum-dark);
	margin: 0 0 var(--ln-space-4);
}

.ln-empty-state__sub {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-base);
	color: var(--ln-color-text-muted);
	margin: 0 0 var(--ln-space-6);
}

.ln-browse-cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--ln-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ln-browse-cat {
	font-family: var(--ln-font-body);
	font-size: var(--ln-text-sm);
	font-weight: var(--ln-weight-medium);
	letter-spacing: var(--ln-tracking-wide);
	text-transform: uppercase;
	color: var(--ln-plum-dark);
	border: 1px solid var(--ln-color-border);
	padding: var(--ln-space-2) var(--ln-space-4);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.ln-browse-cat:hover {
	background: var(--ln-plum-dark);
	color: #fff;
	border-color: var(--ln-plum-dark);
}

/* =========================================================
   5. RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
	.ln-cat-identity {
		padding: var(--ln-space-6) var(--ln-space-4);
	}
	.ln-cat-pitch {
		padding: 0 var(--ln-space-4) var(--ln-space-4);
	}
	.ln-cat-pinned,
	.ln-cat-feed {
		padding: 0 var(--ln-space-4);
	}
	.ln-single {
		padding: 0 var(--ln-space-4) var(--ln-space-10);
	}
	.ln-single__image-wrap {
		margin: var(--ln-space-6) calc(-1 * var(--ln-space-4));
	}
}
