/*
Theme Name: Croponomics
Theme URI: https://croponomics.in
Author: Croponomics
Description: A warm "field journal" theme for Croponomics, essays on how economic policy shapes Indian agriculture. Cream paper, soil and turmeric colours, Fraunces headings.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: croponomics
*/

/* ---------- Shared bits ---------- */
.cn-eyebrow {
	margin: 0;
	font-size: 13px !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--wp--preset--color--turmeric-dark);
}
.cn-meta,
.cn-meta a,
.cn-read-time {
	font-size: 14px;
	color: #6B5B4B;
	text-decoration: none;
}
.cn-meta-row {
	gap: 6px 14px !important;
	align-items: center;
}
.cn-meta-row > * + *::before {
	content: "·";
	margin-right: 14px;
	color: #6B5B4B;
}
.cn-excerpt,
.cn-excerpt p {
	color: var(--wp--preset--color--muted);
	margin: 0;
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--soil);
	border: 1.5px solid var(--wp--preset--color--soil);
	padding: 12.5px 21px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--soil);
	color: var(--wp--preset--color--paper);
}

/* ---------- Header ---------- */
.cn-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.cn-header-inner {
	padding-top: 18px;
	padding-bottom: 18px;
	gap: 16px;
	align-items: center;
}
.cn-brand {
	gap: 10px !important;
	align-items: center;
}
.cn-logo {
	display: block;
	width: 28px;
	height: 28px;
}
.cn-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.2;
}
.cn-site-title a {
	color: var(--wp--preset--color--soil);
	text-decoration: none;
}
.cn-nav-wrap {
	gap: 8px 28px !important;
	align-items: center;
}
.cn-nav {
	font-size: 15px;
	gap: 28px;
}
.cn-nav a,
.cn-footer-nav a {
	color: var(--wp--preset--color--soil);
	text-decoration: none;
}
.cn-nav a:hover,
.cn-footer-nav a:hover {
	text-decoration: underline;
}
.cn-subscribe .wp-block-button__link {
	background: var(--wp--preset--color--soil);
	color: var(--wp--preset--color--paper);
	padding: 12px 18px;
	font-size: 15px;
	font-weight: 500;
}
.cn-subscribe .wp-block-button__link:hover {
	background: var(--wp--preset--color--field);
}

/* ---------- Homepage hero ---------- */
.cn-hero {
	padding-top: clamp(48px, 7vw, 96px);
	padding-bottom: clamp(48px, 7vw, 88px);
}
.cn-hero-text {
	max-width: 760px;
	margin-left: 0 !important;
}
.cn-hero-text > * + * {
	margin-top: 22px;
}
.cn-hero-title {
	font-size: clamp(40px, 5.2vw, 68px) !important;
	line-height: 1.04 !important;
	letter-spacing: -0.02em;
}
.cn-hero-lede {
	font-size: 19px;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
	max-width: 560px;
}
.cn-hero-buttons {
	margin-top: 32px !important;
	gap: 12px;
}

/* ---------- Latest essay band ---------- */
.cn-band {
	background: var(--wp--preset--color--paper-dark);
	padding-top: clamp(48px, 6vw, 72px);
	padding-bottom: clamp(48px, 6vw, 72px);
}
.cn-latest-card {
	display: grid;
	gap: 48px;
	align-items: center;
}
@media (min-width: 800px) {
	.cn-latest-card {
		grid-template-columns: 1fr 1fr;
	}
}
.cn-latest-card:not(:has(.wp-block-post-featured-image)) {
	grid-template-columns: 1fr;
	max-width: 760px;
}
.cn-latest-image {
	margin: 0;
}
.cn-latest-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 4px;
}
.cn-latest-body > * + * {
	margin-top: 16px;
}
.cn-latest-title {
	margin: 0;
	font-size: clamp(30px, 3.2vw, 42px) !important;
	line-height: 1.12;
}
.cn-latest-title a,
.cn-card .wp-block-post-title a,
.cn-related a {
	color: var(--wp--preset--color--soil);
	text-decoration: none;
}
.cn-latest-title a:hover,
.cn-card .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}
.cn-latest .cn-excerpt {
	font-size: 17px;
}
.cn-readmore {
	display: inline-block;
	font-weight: 600;
	color: var(--wp--preset--color--soil);
}

/* ---------- Sections, topics, cards ---------- */
.cn-section {
	padding-top: clamp(48px, 6vw, 72px);
	padding-bottom: clamp(56px, 7vw, 88px);
}
.cn-section-title {
	margin: 0 0 20px;
	font-size: 32px !important;
}
.cn-more-title {
	margin-top: 56px !important;
	margin-bottom: 28px !important;
}
.cn-topics {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.cn-topics li {
	margin: 0;
}
.cn-topics a {
	display: inline-block;
	border: 1px solid #BFAF93;
	border-radius: 999px;
	padding: 12px 18px;
	color: var(--wp--preset--color--soil);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.2;
}
.cn-topics a:hover {
	background: var(--wp--preset--color--sand);
}
.cn-cards .wp-block-post-template {
	gap: 40px 32px;
}
.cn-card > * + * {
	margin-top: 12px;
}
.cn-card .wp-block-post-featured-image {
	margin: 0 0 6px;
}
.cn-card .wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 4px;
}
.cn-card .wp-block-post-title {
	margin: 0;
	font-size: 24px !important;
	line-height: 1.2;
}
.cn-card .cn-excerpt {
	font-size: 16px;
}

/* ---------- Meet the writer ---------- */
.cn-writer-band {
	background: var(--wp--preset--color--paper-dark);
	padding-top: clamp(56px, 7vw, 88px);
	padding-bottom: clamp(56px, 7vw, 88px);
}
.cn-writer {
	display: flex;
	flex-wrap: wrap;
	gap: 32px 56px;
	align-items: center;
}
.cn-monogram {
	flex: 0 0 auto;
	width: clamp(120px, 16vw, 180px);
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: var(--wp--preset--color--field);
	color: var(--wp--preset--color--paper);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(40px, 5vw, 60px);
	font-weight: 500;
	letter-spacing: 0.02em;
}
.cn-portrait {
	flex: 0 0 auto;
	display: block;
	width: clamp(140px, 16vw, 180px);
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center 30%;
	border-radius: 50%;
	border: 4px solid var(--wp--preset--color--paper);
	box-shadow: 0 0 0 1px var(--wp--preset--color--line);
}
.cn-writer-text {
	flex: 1 1 420px;
	min-width: 0;
	max-width: 680px;
}
.cn-writer-text > * + * {
	margin-top: 16px;
}
.cn-writer-title {
	margin: 0;
	font-size: clamp(30px, 3.4vw, 42px) !important;
}
.cn-writer-bio {
	font-size: 18px;
	line-height: 1.65;
	color: var(--wp--preset--color--muted);
}
.cn-writer .wp-block-buttons {
	margin-top: 24px;
}

/* ---------- Quote band ---------- */
.cn-quote-band {
	background: var(--wp--preset--color--soil);
	color: var(--wp--preset--color--paper);
	padding-top: clamp(56px, 7vw, 88px);
	padding-bottom: clamp(56px, 7vw, 88px);
}
.cn-big-quote {
	border: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	max-width: 900px;
}
.cn-big-quote p {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.25;
	margin: 0;
}
.cn-big-quote cite {
	display: block;
	margin-top: 20px;
	font-size: 15px;
	font-style: normal;
	color: #D9C9A8;
}

/* ---------- Subscribe ---------- */
.cn-subscribe-band {
	padding-top: clamp(56px, 7vw, 80px);
	padding-bottom: clamp(56px, 7vw, 80px);
}
.cn-subscribe-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 32px 56px;
	align-items: center;
	justify-content: space-between;
}
.cn-subscribe-text {
	flex: 1 1 380px;
}
.cn-subscribe-text h2 {
	margin: 0;
	font-size: 36px !important;
}
.cn-subscribe-text p {
	margin: 12px 0 0;
	color: var(--wp--preset--color--muted);
}
.cn-subscribe-form {
	flex: 1 1 420px;
}

/* ---------- Footer ---------- */
.cn-footer {
	border-top: 1px solid var(--wp--preset--color--line);
}
.cn-footer-inner {
	padding-top: 28px;
	padding-bottom: 28px;
	gap: 16px;
	font-size: 14px;
	color: #6B5B4B;
}
.cn-footer-inner p {
	margin: 0;
}
.cn-footer-nav {
	gap: 20px;
	font-size: 14px;
}

/* ---------- Single essay ---------- */
.cn-article {
	padding-top: clamp(40px, 6vw, 64px);
	padding-bottom: 24px;
}
.cn-article-head > * + * {
	margin-top: 18px;
}
.cn-article-head .wp-block-post-terms {
	font-size: 14px;
}
.cn-article-head .wp-block-post-terms a {
	color: #6B5B4B;
}
.cn-article-title {
	font-size: clamp(38px, 5vw, 58px) !important;
	line-height: 1.06 !important;
	letter-spacing: -0.02em;
}
.cn-byline {
	gap: 6px 14px !important;
	align-items: center;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--wp--preset--color--line);
	margin-top: 28px !important;
}
.cn-byline .wp-block-post-author {
	align-items: center;
	font-size: 15px;
}
.cn-byline .wp-block-post-author__avatar img {
	border-radius: 50%;
}
.cn-byline .wp-block-post-author__name {
	font-weight: 600;
}
.cn-byline .wp-block-shortcode,
.cn-byline > p {
	margin: 0;
}
.cn-article-image {
	margin-top: 40px !important;
}
.cn-article-image img {
	border-radius: 4px;
	width: 100%;
	height: auto;
}
.cn-article-body {
	margin-top: 48px !important;
}
.cn-article-body h2 {
	font-weight: 600;
	font-size: 30px !important;
	margin-top: 2.2em;
}
.cn-article-body h3 {
	font-weight: 600;
	font-size: 24px !important;
	margin-top: 1.8em;
}
.cn-article-body img {
	border-radius: 4px;
}
.cn-article-body .wp-block-quote,
.cn-article-body blockquote {
	border-left: 3px solid var(--wp--preset--color--turmeric);
	padding: 8px 0 8px 28px;
	margin: 48px 0;
	font-style: italic;
	font-size: 1.4em;
	line-height: 1.35;
}
.cn-article-body .wp-block-table table {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 16px;
}
.cn-article-body li + li {
	margin-top: 0.5em;
}

/* Author box + post navigation */
.cn-author-box {
	margin-top: 56px !important;
}
.cn-author-box .wp-block-post-author {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 32px 0;
	gap: 20px;
}
.cn-author-box .wp-block-post-author__avatar img {
	border-radius: 50%;
}
.cn-author-box .wp-block-post-author__byline {
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--wp--preset--color--turmeric-dark);
}
.cn-author-box .wp-block-post-author__name {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 22px;
	font-weight: 500;
}
.cn-author-box .wp-block-post-author__bio {
	font-size: 16px;
	color: var(--wp--preset--color--muted);
}
.cn-post-nav {
	margin-top: 40px !important;
	gap: 24px !important;
}
.cn-post-nav a {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 20px;
	color: var(--wp--preset--color--soil);
	text-decoration: none;
}
.cn-post-nav a:hover {
	text-decoration: underline;
}
.cn-comments {
	margin-top: 56px !important;
}

/* ---------- Patterns: key numbers, bar chart ---------- */
.cn-key-numbers {
	background: var(--wp--preset--color--paper-dark);
	border-radius: 6px;
	padding: 28px !important;
	font-family: var(--wp--preset--font-family--sans);
	margin-top: 40px;
	margin-bottom: 40px;
}
.cn-key-grid {
	gap: 20px !important;
	margin-top: 16px !important;
	margin-bottom: 0 !important;
}
.cn-stat {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 32px !important;
	font-weight: 600;
	line-height: 1.1;
}
.cn-stat-label {
	margin: 6px 0 0 !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
	color: var(--wp--preset--color--muted);
}
.cn-bars {
	margin: 32px 0 40px;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: 24px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	line-height: 1.4;
}
.cn-bars figcaption {
	margin: 0 0 20px;
	color: var(--wp--preset--color--muted);
	font-weight: 500;
	font-size: 14px;
}
.cn-bar + .cn-bar {
	margin-top: 18px;
}
.cn-bar-label {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
}
.cn-bar-label span:last-child {
	font-weight: 600;
}
.cn-bar-track {
	height: 24px;
	background: var(--wp--preset--color--paper-dark);
	border-radius: 3px;
	overflow: hidden;
}
.cn-bar-fill {
	height: 100%;
	background: var(--wp--preset--color--field);
}
.cn-bar--alt .cn-bar-fill {
	background: var(--wp--preset--color--turmeric);
}
.cn-bars-note {
	margin: 16px 0 0;
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}

/* ---------- Archive, search, 404 ---------- */
.cn-main {
	padding-top: clamp(40px, 6vw, 64px);
	padding-bottom: clamp(56px, 7vw, 88px);
}
.cn-archive-title {
	margin-bottom: 32px;
}
.cn-pagination {
	margin-top: 48px;
	gap: 16px;
}
.cn-pagination a {
	color: var(--wp--preset--color--soil);
}
.cn-page-title {
	font-size: clamp(38px, 5vw, 58px) !important;
}

/* Read more links on cards */
.cn-excerpt .wp-block-post-excerpt__more-text {
	margin-top: 10px;
}
.cn-excerpt .wp-block-post-excerpt__more-link {
	color: var(--wp--preset--color--soil);
	font-weight: 600;
	font-size: 15px;
}
