/*
Theme Name: Brightward
Theme URI: https://gobrightwardofficial.com
Author: Brightward
Description: A clean, fast explainer-magazine theme for Brightward. Each article pairs a YouTube video with an SEO-ready write-up, sources, and a Tools & Resources section.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: brightward
*/

:root {
	--navy: #0a447c;
	--navy-dark: #08365f;
	--blue: #2594e5;
	--ink: #10243b;
	--muted: #5a6b7f;
	--line: #dce8f4;
	--soft: #f3f8fd;
	--bg: #ffffff;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(16, 36, 59, .06), 0 8px 24px rgba(16, 36, 59, .07);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--navy); }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff;
	padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-narrow { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 20px; }
.container-video { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }
.icon { flex: none; vertical-align: -4px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px;
	padding: 13px 22px; border-radius: 12px; border: 2px solid var(--navy); cursor: pointer;
	font-family: inherit; line-height: 1.2;
	transition: background .15s ease, transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(10, 68, 124, .25); }
.btn-sm { padding: 9px 16px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--soft); color: var(--navy-dark); box-shadow: none; }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: #fff; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover, .btn-light:focus-visible { background: var(--soft); color: var(--navy-dark); border-color: var(--soft); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; list-style: none; }
.nav-list > li { display: flex; align-items: center; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-list a:hover, .nav-list .current-menu-item > a, .nav-list .current-cat > a { color: var(--navy); border-bottom-color: var(--blue); }
.header-tools { display: flex; align-items: center; gap: 4px; }
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
	border-radius: 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--soft); color: var(--navy); }
.has-sub { position: relative; }
.sub-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer; border-bottom: 2px solid transparent; }
.sub-toggle:hover, .has-sub.open .sub-toggle { color: var(--navy); border-bottom-color: var(--blue); }
.sub-toggle .icon { transition: transform .15s ease; }
.has-sub.open .sub-toggle .icon { transform: rotate(180deg); }
.sub-list { display: none; position: absolute; top: calc(100% + 10px); left: -16px; min-width: 280px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 60; }
.has-sub.open .sub-list { display: block; }
.sub-list a { display: block; padding: 10px 14px; border-radius: 10px; border-bottom: 0 !important; font-weight: 600; font-size: 15px; }
.sub-list a:hover { background: var(--soft); }
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }

@media (max-width: 860px) {
	.header-inner { gap: 8px; }
	.header-tools { margin-left: auto; }
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: absolute; left: 0; right: 0; top: var(--header-h); background: #fff; border-bottom: 1px solid var(--line);
		flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 20px 22px; margin: 0;
		display: none; box-shadow: 0 16px 24px rgba(16, 36, 59, .08);
	}
	.nav-open .site-nav { display: flex; }
	.nav-list { flex-direction: column; gap: 2px; }
	.nav-list a, .sub-toggle { display: flex; width: 100%; padding: 12px 4px; font-size: 17px; border-bottom: 1px solid var(--line); justify-content: space-between; }
	.sub-list { position: static; box-shadow: none; border: 0; padding: 0 0 6px 12px; min-width: 0; }
	.sub-list a { font-weight: 500; }
	.nav-cta { align-self: flex-start; }
	.nav-open .nav-toggle .i-open { display: none; }
	.nav-open .nav-toggle .i-close { display: inline; }
}

/* ---------- Shared bits ---------- */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.kicker {
	display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--navy); text-decoration: none; background: var(--soft); border: 1px solid var(--line);
	padding: 4px 10px; border-radius: 999px;
}
.kicker:hover { background: #fff; color: var(--blue); }
.meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.section { padding-top: 56px; padding-bottom: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-size: 26px; }

.play-badge {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 76px; height: 76px; border-radius: 50%; background: rgba(10, 68, 124, .92); color: #fff;
	display: grid; place-items: center; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); transition: transform .2s ease, background .2s ease;
}
.play-badge .icon { width: 32px; height: 32px; margin-left: 4px; }
.play-badge-sm { width: 48px; height: 48px; left: 14px; top: auto; bottom: 14px; transform: none; }
.play-badge-sm .icon { width: 20px; height: 20px; margin-left: 2px; }
a:hover > .play-badge, .video-poster:hover .play-badge { background: var(--blue); }
a:hover > .play-badge:not(.play-badge-sm), .video-poster:hover .play-badge { transform: translate(-50%, -50%) scale(1.06); }

/* ---------- Home ---------- */
.home-intro { padding-top: 44px; padding-bottom: 8px; }
.home-title { font-size: clamp(30px, 5vw, 50px); color: var(--navy); margin-top: 6px; max-width: 18em; font-weight: 800; }

.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding-top: 32px; }
.hero-media { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--soft); box-shadow: var(--shadow); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-body { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; }
.hero-title a { color: var(--ink); text-decoration: none; }
.hero-title a:hover { color: var(--navy); }
.hero-excerpt { color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 22px; } }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #eaf4fd, #d6e9fa); }
.thumb-placeholder img { width: 72px; height: 72px; opacity: .9; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; align-items: flex-start; flex: 1; }
.card-title { font-size: 19px; font-weight: 700; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--navy); }
.card-excerpt { color: var(--muted); font-size: 15.5px; }
.card .meta { margin-top: auto; }

/* Topics */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .topic-grid { grid-template-columns: 1fr; } }
.topic {
	display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; border-radius: var(--radius);
	background: var(--soft); border: 1px solid var(--line); border-left: 5px solid var(--blue); text-decoration: none; color: var(--ink);
	transition: box-shadow .2s ease, transform .2s ease, background .2s ease;
}
a.topic:hover { background: #fff; box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.topic h3 { font-size: 19px; color: var(--navy); }
.topic p { color: var(--muted); font-size: 15px; }
.topic-count { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; padding-top: 4px; }
.topic-soon { opacity: .75; border-left-color: var(--line); }
.topic-soon .topic-count { color: var(--muted); }

/* Subscribe band */
.band { background: var(--navy); color: #fff; margin-top: 72px; }
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 38px; padding-bottom: 38px; flex-wrap: wrap; }
.band h2 { font-size: 26px; }
.band p { color: #cfe3f6; margin-top: 4px; }

.empty-state { text-align: center; padding: 72px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty-state h1, .empty-state h2 { font-size: 30px; color: var(--navy); }
.empty-state p { color: var(--muted); max-width: 34em; }

/* ---------- Archive ---------- */
.archive-head { padding-top: 52px; padding-bottom: 4px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.archive-title { font-size: clamp(30px, 4.6vw, 44px); color: var(--navy); font-weight: 800; }
.archive-desc { color: var(--muted); font-size: 18px; max-width: 42em; }
.navigation.pagination { margin-top: 44px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers { padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.page-numbers.current, .page-numbers:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.search-form { display: flex; gap: 10px; width: 100%; max-width: 520px; margin-top: 6px; }
.search-form input[type="search"] { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--line); font: inherit; background: #fff; color: var(--ink); }
.search-form input[type="search"]:focus { border-color: var(--blue); outline: none; }

/* ---------- Article ---------- */
.article-head { padding-top: 44px; padding-bottom: 26px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.article-title { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.article-dek { font-size: 20px; color: var(--muted); line-height: 1.5; }

.video-frame { position: relative; aspect-ratio: 16 / 9; background: #0b1b2d; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.video-poster { position: absolute; inset: 0; display: block; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.article-layout { display: grid; grid-template-columns: minmax(0, 720px) 280px; gap: 64px; justify-content: center; padding-top: 44px; }
@media (max-width: 1060px) { .article-layout { grid-template-columns: minmax(0, 720px); gap: 0; } .article-aside { display: none; } }
.article-main { min-width: 0; }
.article-aside { position: relative; }
.toc-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 10px; }
.admin-bar .toc-sticky { top: calc(var(--header-h) + 56px); }
.aside-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.toc-list ol { list-style: none; border-left: 2px solid var(--line); }
.toc-list a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.4; }
.toc-list .toc-l3 a { padding-left: 30px; font-size: 14px; }
.toc-list a:hover { color: var(--navy); }
.toc-list a.is-active { color: var(--navy); border-left-color: var(--blue); font-weight: 600; }
.aside-watch { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: 15px; text-decoration: none; }
.toc-mobile { border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); padding: 14px 18px; margin-bottom: 28px; }
.toc-mobile summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.toc-mobile .toc-list { margin-top: 10px; }
@media (min-width: 1061px) { .toc-mobile { display: none; } }

.takeaways { background: var(--soft); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 32px; }
.takeaways h2 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.takeaways ul { list-style: none; display: grid; gap: 10px; }
.takeaways li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.takeaways .icon { color: var(--blue); margin-top: 3px; }

.prose { font-size: 19px; line-height: 1.75; color: #1a2f48; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 30px; margin-top: 2.1em; color: var(--ink); font-weight: 800; }
.prose h3 { font-size: 23px; margin-top: 1.8em; color: var(--ink); }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--blue); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose img { border-radius: 12px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--blue); color: var(--ink); font-size: 21px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: var(--soft); }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.prose code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }

.sources { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 22px; margin-bottom: 14px; }
.sources ol { padding-left: 1.3em; display: grid; gap: 8px; font-size: 16px; }
.src-host { color: var(--muted); font-size: 14px; margin-left: 6px; }
.src-host::before { content: "\00b7\00a0"; }

.tools { margin-top: 48px; background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.tools-head h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.disclosure { margin-top: 10px; font-size: 14px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-top: 22px; }
.tool { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tool-media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.tool-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.tool-ph { color: var(--blue); }
.tool-ph .icon { width: 44px; height: 44px; }
.tool h3 { font-size: 16.5px; line-height: 1.3; }
.tool p { font-size: 14.5px; color: var(--muted); }
.tool .btn { margin-top: auto; font-size: 15px; padding: 11px 14px; }

.disclaimer { margin-top: 36px; padding: 18px 20px; border: 1px dashed #b9cfe4; border-radius: var(--radius); font-size: 14.5px; color: var(--muted); display: grid; gap: 6px; }
.cta-card { margin-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 18px; padding: 26px 28px; }
.cta-card h2 { font-size: 22px; }
.cta-card p { color: #cfe3f6; margin-top: 4px; }
.cta-card .btn { background: #fff; color: var(--navy); border-color: #fff; }
.cta-card .btn:hover { background: var(--soft); color: var(--navy-dark); }

.related { padding-top: 64px; }
.page-article { padding-bottom: 56px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; background: var(--soft); border-top: 1px solid var(--line); }
.band + .site-footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-top: 52px; padding-bottom: 36px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 420px; }
.footer-brand img { height: 30px; width: auto; }
.footer-brand p { color: var(--muted); font-size: 15.5px; }
.footer-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.footer-list { list-style: none; display: grid; gap: 9px; }
.footer-list a { color: var(--ink); text-decoration: none; font-size: 15.5px; }
.footer-list a:hover { color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
@media print {
	.site-header, .site-footer, .band, .cta-card, .article-aside, .video-frame { display: none; }
}

/* Share bar */
.share{margin:2rem 0;padding:1.1rem 1.25rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--soft)}
.share-title{margin:0 0 .65rem;font-weight:700;color:var(--ink);font-size:1rem}
.share-links{display:flex;flex-wrap:wrap;gap:.5rem}
.share-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.45rem .95rem;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--navy);font:inherit;font-size:.92rem;font-weight:600;text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.share-btn:hover,.share-btn:focus-visible{background:var(--navy);border-color:var(--navy);color:#fff}
.share-btn[hidden]{display:none}
.share-status{display:block;min-height:1.2em;margin-top:.5rem;font-size:.88rem;color:var(--muted)}
