/*
Theme Name: Positive Romania
Theme URI: https://positiveromania.com
Author: Positive Romania
Description: Verified stories of Romanian excellence, at home and abroad. Deep blue on paper; tricolour as accent only.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: positiveromania
*/

:root {
	--paper: #f6f2ea;
	--paper-deep: #ece5d6;
	--ink: #0b1f3f;
	--ink-soft: #33456a;
	--muted: #6a7489;
	--rule: #d6ccb9;
	--flag-blue: #002b7f;
	--flag-yellow: #fcd116;
	--flag-red: #ce1126;
	--accent: var(--flag-red);

	--font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1240px;
	--wrap-narrow: 760px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img, iframe, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--flag-blue); }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--flag-blue); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
	background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(var(--wrap-narrow) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 7vw, 96px); }
.band-paper-deep { background: var(--paper-deep); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink a:hover { color: var(--flag-yellow); }

/* ---------- Header ---------- */

.topbar { border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }

.lang-switch { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lang-switch a {
	display: block; padding: 2px 8px; text-decoration: none; font-weight: 600;
	text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.lang-switch .current-lang a, .lang-switch a[aria-current] { background: var(--ink); color: var(--paper); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }

.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wordmark-text { display: flex; flex-direction: column; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; line-height: 1; font-size: 17px; }
.wordmark-text span:last-child { letter-spacing: .12em; }
.wordmark:hover { color: inherit; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav .current_page_item a, .site-nav .current-menu-item a { box-shadow: inset 0 -2px 0 var(--accent); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 22px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }

.tricolor { display: flex; height: 4px; }
.tricolor span { flex: 1; }
.tricolor span:nth-child(1) { background: var(--flag-blue); }
.tricolor span:nth-child(2) { background: var(--flag-yellow); }
.tricolor span:nth-child(3) { background: var(--flag-red); }

.pillar-rail { border-bottom: 1px solid var(--rule); background: var(--paper); }
.pillar-rail ul {
	display: flex; gap: 28px; list-style: none; margin-block: 0; padding-block: 12px;
	overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.pillar-rail ul::-webkit-scrollbar { display: none; }
.pillar-rail a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.pillar-rail a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Buttons & small parts ---------- */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: 600 15px/1 var(--font); padding: 14px 22px; border: 1.5px solid var(--ink);
	background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
	border-radius: var(--radius); transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--flag-blue); border-color: var(--flag-blue); color: #fff; }
.btn-small { padding: 9px 14px; font-size: 14px; }
.band-ink .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.band-ink .btn-primary:hover { background: var(--flag-yellow); border-color: var(--flag-yellow); color: var(--ink); }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.eyebrow-accent { color: var(--accent); }
.band-ink .eyebrow { color: #aab4c8; }

.kicker {
	display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em;
	text-transform: uppercase; text-decoration: none; color: var(--flag-blue); margin-bottom: 10px;
}

.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

.badge-verified {
	display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
	text-transform: uppercase; letter-spacing: .08em; color: var(--flag-blue);
	border: 1px solid currentColor; padding: 4px 10px;
}
.badge-verified::before { content: "✓"; }

.empty { color: var(--muted); }

/* ---------- Images ---------- */

.photo { width: 100%; object-fit: cover; object-position: center 25%; }
.img-fallback {
	aspect-ratio: 10 / 7; width: 100%; background: var(--ink); color: var(--paper);
	display: grid; place-items: center; position: relative; overflow: hidden;
	background-image: repeating-linear-gradient(0deg, transparent 0 10px, rgba(246, 242, 234, .07) 10px 12px);
}

/* ---------- Lead ---------- */

.lead {
	display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 56px);
	align-items: center; padding-block: clamp(32px, 5vw, 64px);
	border-bottom: 1px solid var(--rule);
}
.lead-media img, .lead-media .img-fallback { aspect-ratio: 16 / 10; }
.lead-title { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
.lead-title a { text-decoration: none; }
.lead-excerpt { font-size: 1.15rem; color: var(--ink-soft); }
.lead .btn { margin-top: 12px; }

/* ---------- Sections & cards ---------- */

.section-head {
	display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
	border-top: 3px solid var(--ink); padding-top: 18px; margin-bottom: 36px;
}
.section-head h2 { margin: 0; max-width: 22ch; }
.section-more { margin: 40px 0 0; }


.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
.card-media { display: block; position: relative; margin-bottom: 16px; }
.card-media img { aspect-ratio: 10 / 7; }
.badge-video {
	position: absolute; left: 12px; bottom: 12px; background: var(--paper); color: var(--ink);
	font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px;
}
.badge-video::before { content: "▶ "; }
.card-title { font-size: 1.35rem; margin-bottom: 10px; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-meta { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Pillars ---------- */

.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.pillars li { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pillars a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 28px 24px; text-decoration: none; transition: background .15s; }
.pillars a:hover { background: var(--paper); color: inherit; }
.pillar-name { font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.pillar-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.pillar-count { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Principles & stats ---------- */

.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.principles h3 { font-size: 1.1rem; }
.principles p { font-size: 16px; color: var(--ink-soft); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; border-top: 1px solid var(--rule); padding-top: 32px; }
.stats strong { display: block; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.stats span { font-size: 15px; color: var(--muted); }

/* ---------- Forms ---------- */

.nominate { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form input, .form textarea, .newsletter-form input {
	width: 100%; font: 400 17px/1.4 var(--font); color: var(--ink); background: var(--paper);
	border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 12px 14px;
}
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }

.form-notice { margin: 0; padding: 12px 16px; font-weight: 600; font-size: 15px; border-left: 4px solid var(--flag-blue); background: rgba(0, 43, 127, .08); }
.form-notice.is-error { border-color: var(--flag-red); background: rgba(206, 17, 38, .08); }
.band-ink .form-notice { background: rgba(255, 255, 255, .1); color: var(--paper); border-color: var(--flag-yellow); }

.newsletter { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-block: clamp(48px, 6vw, 80px); }
.newsletter h2 { max-width: 20ch; }
.newsletter p { color: #c3cbdb; margin: 0; }
.newsletter-form { display: flex; gap: 10px; margin-bottom: 12px; }
.newsletter-form input { background: transparent; color: var(--paper); border-color: #6c7b99; }
.newsletter-form input::placeholder { color: #8f9bb5; }

/* ---------- Story ---------- */

.story-head { padding-top: clamp(40px, 6vw, 80px); padding-bottom: 32px; }
.story-title { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.story-dek { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--ink-soft); line-height: 1.45; }
.story-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0; margin-top: 24px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 15px; color: var(--muted); }
.byline-author { color: var(--ink); font-weight: 600; }

.story-hero { margin: 0 auto 48px; }
.story-hero img { aspect-ratio: 16 / 9; }
.story-hero figcaption { font-size: 14px; color: var(--muted); padding-top: 10px; }

.story-layout { display: grid; grid-template-columns: minmax(0, var(--wrap-narrow)); justify-content: center; gap: 56px; }
.story-layout.has-aside { grid-template-columns: minmax(0, var(--wrap-narrow)) 320px; }
.story-aside { position: sticky; top: 24px; align-self: start; }

.prose { font-size: 19px; line-height: 1.7; }
.prose > p:first-child::first-letter {
	float: left; font-size: 4.2em; line-height: .85; font-weight: 800; padding: 6px 10px 0 0; color: var(--flag-blue);
}
.prose h2 { font-size: 1.7rem; margin-top: 1.8em; }
.prose blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 3px solid var(--accent); font-size: 1.3rem; font-weight: 600; line-height: 1.4; }

.video iframe { width: 100%; border: 0; }
.video-wide iframe { aspect-ratio: 16 / 9; height: auto; }
.video-vertical iframe, .video-vertical blockquote { aspect-ratio: 9 / 16; height: auto; max-width: 325px; margin: 0; }

.story-doc { margin-top: 64px; }
.story-foot { margin-top: 56px; padding-bottom: 72px; }
.sources { border-top: 1px solid var(--rule); padding-top: 24px; margin-bottom: 40px; }
.sources h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.sources ol { margin: 0; padding-left: 20px; font-size: 15px; color: var(--ink-soft); }

.share { background: var(--paper-deep); padding: 28px; border-top: 3px solid var(--ink); }
.share-prompt { font-size: 1.25rem; font-weight: 800; line-height: 1.3; }
.share-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Archives ---------- */

.archive-head { padding-top: clamp(40px, 6vw, 80px); padding-bottom: 8px; }
.archive-num { font-size: clamp(3rem, 8vw, 6rem); font-weight: 800; color: var(--flag-blue); line-height: 1; margin-bottom: 12px; }
.archive-desc { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 56px; }
.nav-links .page-numbers { padding: 8px 14px; border: 1px solid var(--rule); text-decoration: none; font-weight: 600; }
.nav-links .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.page-article { padding-bottom: 80px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #c3cbdb; border-top: 1px solid #22375e; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-block: 56px; }
.site-footer .wordmark { color: var(--paper); }
.footer-claim { margin-top: 16px; max-width: 32ch; }
.site-footer h4 { color: var(--paper); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--flag-yellow); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #22375e; padding-block: 20px; font-size: 13px; }
.footer-sign { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--paper); }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.grid-cards { grid-template-columns: repeat(2, 1fr); }
	.principles { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.story-layout.has-aside { grid-template-columns: minmax(0, 1fr); }
	.story-aside { position: static; max-width: var(--wrap-narrow); }
}

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
		flex-direction: column; align-items: stretch; gap: 16px; padding: 20px var(--gutter);
		background: var(--paper); border-bottom: 1px solid var(--rule);
	}
	.site-header { position: relative; }
	.header-inner { position: static; }
	.nav-open .site-nav { display: flex; }
	.site-nav ul { flex-direction: column; gap: 12px; }
	.lead { grid-template-columns: 1fr; }
	.nominate, .newsletter { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	body { font-size: 17px; }
	.grid-cards, .principles, .stats { grid-template-columns: 1fr; }
	.form-row { grid-template-columns: 1fr; }
	.newsletter-form { flex-direction: column; }
	.footer-grid { grid-template-columns: 1fr; }
	.footer-bottom { flex-direction: column; }
	.prose { font-size: 18px; }
}
