/*
Theme Name: Academy Notebook
Theme URI: https://example.com
Author: Your Name
Description: A lightweight, distinctive companion theme for Academy LMS & Community — a "study notebook" aesthetic built for course pages, lessons, quizzes, and the social feed.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: academy-notebook
*/

/* ============ Design tokens ============ */
:root {
	--ink: #1C2541;
	--paper: #F2F4EF;
	--paper-alt: #FFFFFF;
	--moss: #3F6C51;
	--moss-dark: #2C4C39;
	--marigold: #E4A427;
	--clay: #B4533C;
	--line: #D8DCD3;
	--text: #2E2E2E;
	--text-muted: #63685F;

	--font-display: 'Fraunces', Georgia, serif;
	--font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	--font-mono: 'IBM Plex Mono', Menlo, monospace;

	--container: 1080px;
	--radius: 10px;
}

/* ============ Reset & base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss-dark); }
a:hover { color: var(--moss); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--ink);
	line-height: 1.15;
	margin: 0 0 0.5em;
	font-weight: 600;
}
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.3rem; }

.eyebrow {
	font-family: var(--font-mono);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 12px;
	color: var(--moss-dark);
	display: inline-block;
	margin-bottom: 10px;
}

/* Signature: highlighter-swipe emphasis on key words */
.ink-highlight {
	position: relative;
	white-space: nowrap;
}
.ink-highlight::before {
	content: "";
	position: absolute;
	left: -4px; right: -4px; bottom: 0.05em; top: 0.32em;
	background: var(--marigold);
	opacity: 0.45;
	transform: rotate(-0.6deg);
	z-index: -1;
	border-radius: 3px 6px 4px 7px;
}

/* Skip link */
.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
	padding: 10px 16px; z-index: 9999; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
	outline: 3px solid var(--marigold);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}

/* ============ Layout ============ */
.wrap-inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

/* Ruled section — thin left rule with a marginalia label, like a notebook page */
.ruled {
	border-left: 2px solid var(--line);
	padding-left: 24px;
	position: relative;
}
.ruled .eyebrow { margin-left: -2px; }

section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }

/* ============ Header ============ */
.site-header {
	background: var(--paper-alt);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header-inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.site-branding a {
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.01em;
}
.site-branding span {
	color: var(--moss);
}
.main-nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}
.main-nav a {
	color: var(--text);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
}
.main-nav a:hover { color: var(--moss-dark); }
.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 8px 12px;
	font-family: var(--font-mono);
	cursor: pointer;
}
.header-cta {
	background: var(--ink);
	color: #fff;
	padding: 9px 18px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}
.header-cta:hover { background: var(--moss-dark); color: #fff; }

@media (max-width: 780px) {
	.main-nav { display: none; width: 100%; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 4px; padding: 16px 0; }
	.site-header-inner { flex-wrap: wrap; }
	.nav-toggle { display: block; }
}

/* ============ Hero (front page) ============ */
.hero {
	padding: 90px 0 70px;
	position: relative;
	overflow: hidden;
}
.hero-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 56px;
	align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero-lede {
	font-size: 18px;
	color: var(--text-muted);
	max-width: 46ch;
	margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
	display: inline-block;
	font-weight: 600;
	font-size: 15px;
	padding: 12px 24px;
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	border: none;
}
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--moss-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* Syllabus-style mini list in the hero, since curriculum order is real sequence */
.hero-syllabus {
	background: var(--paper-alt);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 22px;
}
.hero-syllabus .eyebrow { margin-bottom: 14px; }
.hero-syllabus ol {
	list-style: none;
	margin: 0; padding: 0;
	counter-reset: syllabus;
}
.hero-syllabus li {
	counter-increment: syllabus;
	display: flex;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--line);
	font-size: 14.5px;
}
.hero-syllabus li:last-child { border-bottom: none; }
.hero-syllabus li::before {
	content: counter(syllabus, decimal-leading-zero);
	font-family: var(--font-mono);
	color: var(--moss);
	font-size: 13px;
	flex-shrink: 0;
}

/* ============ Section headers ============ */
.section-head { margin-bottom: 36px; max-width: 640px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--text-muted); margin: 0; }

/* ============ Stats strip ============ */
.stats-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.stat-item { text-align: left; }
.stat-item .num {
	font-family: var(--font-display);
	font-size: 2.4rem;
	color: var(--moss-dark);
	display: block;
}
.stat-item .label {
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}
@media (max-width: 700px) {
	.stats-strip { grid-template-columns: repeat(2, 1fr); }
	.hero-grid { grid-template-columns: 1fr; }
}

/* ============ Course card "folded corner" override ============ */
/* Restyles the plugin's .academy-course-card with a notebook-page corner fold. */
.academy-course-card {
	position: relative;
	border-radius: 4px !important;
	border-color: var(--line) !important;
	background: var(--paper-alt);
	overflow: visible !important;
}
.academy-course-card::after {
	content: "";
	position: absolute;
	top: 0; right: 0;
	width: 0; height: 0;
	border-style: solid;
	border-width: 0 22px 22px 0;
	border-color: transparent var(--paper) transparent transparent;
	filter: drop-shadow(-1px 1px 1px rgba(0,0,0,0.08));
}
.academy-course-card-body h3 a { font-family: var(--font-display); }
.academy-badge {
	background: rgba(63,108,81,0.1) !important;
	color: var(--moss-dark) !important;
	font-family: var(--font-mono);
	text-transform: uppercase;
	font-size: 11px !important;
	letter-spacing: 0.04em;
}
.academy-btn {
	background: var(--moss) !important;
	border-radius: 999px !important;
	font-family: var(--font-body);
}
.academy-btn:hover { background: var(--moss-dark) !important; }
.academy-btn-secondary {
	background: transparent !important;
	color: var(--moss-dark) !important;
	border: 1.5px solid var(--line) !important;
}
.academy-progress-bar-fill { background: var(--marigold) !important; }

/* ============ Content area (single pages, lessons, etc.) ============ */
.content-wrap {
	max-width: 760px;
	margin: 0 auto;
	padding: 56px 24px 80px;
}
.content-wrap .entry-title { margin-bottom: 8px; }
.content-wrap .entry-meta {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 32px;
}
.entry-content p { margin: 0 0 1.2em; }

/* ============ Footer ============ */
.site-footer {
	background: var(--ink);
	color: #cfd6d0;
	padding: 48px 0 28px;
	margin-top: 60px;
}
.site-footer a { color: #fff; }
.footer-grid {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 32px;
}
.footer-brand { font-family: var(--font-display); color: #fff; font-size: 20px; }
.footer-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; font-size: 14px; color: #cfd6d0; }
.footer-nav a:hover { color: var(--marigold); }
.footer-bottom {
	font-family: var(--font-mono);
	font-size: 12px;
	color: #8b9a90;
	border-top: 1px solid rgba(255,255,255,0.1);
	padding-top: 20px;
}

/* ============ 404 / empty states ============ */
.empty-state { text-align: center; padding: 80px 24px; }
.empty-state h1 { margin-bottom: 12px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* ============ Admin notice: plugin installer ============ */
.academy-install-notice { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.academy-install-notice .button-primary { background: var(--moss); border-color: var(--moss-dark); }
