/*
Theme Name: World of Health
Theme URI: https://worldofhealth.example
Author: World of Health
Description: Original theme for the World of Health peer-reviewed journal, integrated with the World of Health Track plugin for manuscript submission and review.
Version: 3.1.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: world-of-health
*/

/* ============ DESIGN TOKENS ============ */
:root {
	--woh-ink: #16241F;
	--woh-primary: #0F5D52;
	--woh-primary-dark: #0A423A;
	--woh-accent: #E8553A;
	--woh-paper: #F3F5F1;
	--woh-paper-raised: #FFFFFF;
	--woh-muted: #62726C;
	--woh-border: #DCE1DC;

	--woh-font-display: 'Newsreader', Georgia, serif;
	--woh-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--woh-font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--woh-paper);
	color: var(--woh-ink);
	font-family: var(--woh-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--woh-primary); }
a:hover { color: var(--woh-primary-dark); }

h1, h2, h3, h4 {
	font-family: var(--woh-font-display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	color: var(--woh-ink);
}
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.4rem; }

.woh-eyebrow {
	font-family: var(--woh-font-mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--woh-primary);
}

:focus-visible {
	outline: 2px solid var(--woh-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============ LAYOUT ============ */
.woh-container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}
.woh-section { padding: 56px 0; }

/* ============ SIGNATURE: PULSE DIVIDER ============ */
.woh-pulse-divider {
	width: 100%;
	height: 28px;
	margin: 0;
	display: block;
}
.woh-pulse-divider path {
	fill: none;
	stroke: var(--woh-accent);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 400;
	stroke-dashoffset: 400;
	animation: woh-draw 1.4s ease-out forwards;
}
@keyframes woh-draw {
	to { stroke-dashoffset: 0; }
}

/* ============ HEADER ============ */
.woh-site-header {
	background: var(--woh-paper-raised);
	border-bottom: 1px solid var(--woh-border);
}
.woh-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px 0;
	max-width: 1180px;
	margin: 0 auto;
	flex-wrap: wrap;
	gap: 14px;
}
.woh-logo {
	font-family: var(--woh-font-display);
	font-size: 26px;
	font-weight: 500;
	text-decoration: none;
	color: var(--woh-ink);
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}
.woh-logo span {
	font-family: var(--woh-font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--woh-muted);
	font-weight: 400;
	margin-top: 4px;
}
.woh-nav { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.woh-nav a {
	text-decoration: none;
	color: var(--woh-ink);
	font-size: 14px;
	font-weight: 500;
}
.woh-nav a:hover { color: var(--woh-primary); }

/* ============ HERO ============ */
.woh-hero {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 48px;
	padding: 56px 0;
	align-items: start;
}
.woh-hero-lead .woh-eyebrow { margin-bottom: 14px; display: block; }
.woh-hero-lead h1 a { color: var(--woh-ink); text-decoration: none; }
.woh-hero-lead h1 a:hover { color: var(--woh-primary); }
.woh-hero-excerpt { font-size: 18px; color: var(--woh-muted); margin: 18px 0 24px; max-width: 60ch; }
.woh-hero-meta { font-family: var(--woh-font-mono); font-size: 13px; color: var(--woh-muted); }

.woh-hero-list { display: flex; flex-direction: column; gap: 22px; }
.woh-hero-list-item { border-top: 1px solid var(--woh-border); padding-top: 16px; transition: padding-left .15s ease; }
.woh-hero-list-item:hover { padding-left: 4px; }
.woh-hero-list-item a {
	font-family: var(--woh-font-display);
	font-size: 18px;
	text-decoration: none;
	color: var(--woh-ink);
	font-weight: 500;
}
.woh-hero-list-item a:hover { color: var(--woh-primary); }
.woh-hero-list-item p { color: var(--woh-muted); font-size: 14px; margin: 6px 0 0; }

/* ============ CTA STRIP ============ */
.woh-cta-strip {
	background: linear-gradient(135deg, var(--woh-primary), var(--woh-primary-dark));
	color: #fff;
	border-radius: 16px;
	padding: 34px 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	box-shadow: 0 16px 40px rgba(15,93,82,.18);
}
.woh-cta-strip h3 { color: #fff; margin: 0 0 6px; }
.woh-cta-strip p { color: #cfe3de; margin: 0; max-width: 46ch; }
.woh-cta-btn {
	background: #fff;
	color: var(--woh-primary-dark);
	text-decoration: none;
	padding: 12px 22px;
	border-radius: 8px;
	font-weight: 600;
	white-space: nowrap;
	transition: transform .15s ease, box-shadow .15s ease;
}
.woh-cta-btn:hover { background: #e9f2ef; color: var(--woh-primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }

/* ============ ARTICLE GRID / ARCHIVE ============ */
.woh-issue-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; }
.woh-issue-heading h2 { margin: 0; }
.woh-article-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.woh-article-card {
	background: var(--woh-paper-raised);
	border: 1px solid var(--woh-border);
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 2px rgba(22,36,31,.03);
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.woh-article-card:hover {
	box-shadow: 0 12px 28px rgba(22,36,31,.08);
	transform: translateY(-2px);
	border-color: #c9d3ce;
}
.woh-article-card a.woh-article-title {
	font-family: var(--woh-font-display);
	font-size: 19px;
	font-weight: 500;
	text-decoration: none;
	color: var(--woh-ink);
}
.woh-article-card a.woh-article-title:hover { color: var(--woh-primary); }
.woh-article-card .woh-article-author { font-family: var(--woh-font-mono); font-size: 12px; color: var(--woh-muted); margin: 8px 0 10px; }
.woh-article-card p.woh-article-excerpt { font-size: 14px; color: var(--woh-ink); margin: 0; }

/* ============ SINGLE ARTICLE ============ */
.woh-single-article { max-width: 760px; margin: 0 auto; padding: 56px 24px; }
.woh-single-article .woh-eyebrow { display: block; margin-bottom: 18px; }
.woh-single-article h1 { margin-bottom: 18px; }
.woh-article-meta-row {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	font-family: var(--woh-font-mono);
	font-size: 13px;
	color: var(--woh-muted);
	border-top: 1px solid var(--woh-border);
	border-bottom: 1px solid var(--woh-border);
	padding: 16px 0;
	margin: 24px 0 32px;
}
.woh-single-article .woh-abstract {
	font-size: 18px;
	color: var(--woh-muted);
	border-left: 3px solid var(--woh-accent);
	padding-left: 20px;
	margin-bottom: 32px;
}
.woh-single-article .woh-body { font-size: 17px; line-height: 1.75; }
.woh-single-article .woh-body p { margin: 0 0 1.3em; }
.woh-keywords { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.woh-keyword-tag {
	font-family: var(--woh-font-mono);
	font-size: 12px;
	background: var(--woh-paper);
	border: 1px solid var(--woh-border);
	padding: 4px 10px;
	border-radius: 999px;
	color: var(--woh-muted);
}
.woh-download-link {
	display: inline-block;
	margin-top: 28px;
	padding: 12px 20px;
	background: var(--woh-primary);
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	transition: background-color .15s ease, transform .15s ease;
}
.woh-download-link:hover { background: var(--woh-primary-dark); color: #fff; transform: translateY(-1px); }

/* ============ GENERIC PAGE ============ */
.woh-page { max-width: 760px; margin: 0 auto; padding: 56px 24px; }
.woh-page .woh-eyebrow { display: block; margin-bottom: 14px; }
.woh-page-content { font-size: 17px; line-height: 1.75; white-space: pre-line; }

/* ============ DASHBOARD PAGE WRAPPER ============ */
.woh-dashboard-page { max-width: 960px; margin: 0 auto; padding: 56px 24px; }

/* ============ FOOTER ============ */
.woh-site-footer { background: var(--woh-ink); color: #c9d3cf; margin-top: 64px; }
.woh-footer-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px 24px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 32px;
}
.woh-footer-inner h4 { color: #fff; font-family: var(--woh-font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.woh-footer-inner p, .woh-footer-inner a { color: #9fb0aa; font-size: 14px; text-decoration: none; }
.woh-footer-inner a:hover { color: #fff; }
.woh-footer-bottom {
	text-align: center;
	padding: 18px 24px 28px;
	font-family: var(--woh-font-mono);
	font-size: 12px;
	color: #6f7f79;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
	.woh-hero { grid-template-columns: 1fr; }
	.woh-article-grid { grid-template-columns: 1fr; }
	.woh-footer-inner { grid-template-columns: 1fr; }
	.woh-nav { gap: 16px; flex-wrap: wrap; }
	.woh-cta-strip { flex-direction: column; align-items: flex-start; }
}
