/*
Theme Name: EconomyTutor
Theme URI: https://economytutor.com/
Author: Saage Media GmbH
Description: Website of the EconomyTutor.com video series (economics, explained step by step). English at the root, German under /de/.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: economytutor
*/

@font-face {
	font-family: "Archivo";
	src: url("assets/fonts/Archivo-VariableFont.woff") format("woff");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-display: swap;
}

:root {
	--teal-dark: #0B3A44;
	--teal: #127C86;
	--teal-light: #6CC5C7;
	--gold: #E3A83A;
	--gold-dark: #A8730F;
	--cream: #FBF4E4;
	--cream-2: #F4E9CF;
	--burgundy: #7A1A24;
	--night: #10222E;
	--ink: #17262D;
	--muted: #4E5F66;
	--line: #E3D6B8;
	--white: #FFFDF8;
	--radius: 14px;
	--max: 1120px;
	--font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

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

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

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }

h1, h2, h3 {
	font-family: var(--font);
	color: var(--teal-dark);
	line-height: 1.15;
	margin: 0 0 .5em;
	font-weight: 800;
	letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 20px;
}

.skip-link {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: 12px;
	top: 12px;
	background: var(--white);
	padding: 8px 12px;
	z-index: 100;
}

/* Header */
.site-header {
	background: var(--white);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 20;
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 68px;
}
.brand { display: block; width: 230px; flex: 0 0 auto; }
.brand img { width: 100%; }
.nav {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.nav a {
	text-decoration: none;
	color: var(--teal-dark);
	font-weight: 600;
	font-size: .95rem;
	padding: 8px 10px;
	border-radius: 8px;
}
.nav a:hover,
.nav a[aria-current="page"] { background: var(--cream); }
.nav .lang {
	border: 1px solid var(--line);
	font-weight: 700;
	font-size: .85rem;
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 13px 22px;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	border: 2px solid var(--teal);
	background: var(--teal);
	color: #fff;
	line-height: 1.2;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--teal-dark); border-color: var(--teal-dark); }
.btn.secondary:hover { background: var(--teal-dark); color: #fff; }
.btn.disabled {
	background: transparent;
	color: var(--muted);
	border-color: var(--line);
	cursor: default;
}

/* Hero */
.hero {
	background: var(--cream);
	border-bottom: 1px solid var(--line);
	overflow: hidden;
}
.hero .wrap {
	display: grid;
	grid-template-columns: 1.25fr .75fr;
	align-items: center;
	gap: 40px;
	padding-top: 64px;
	padding-bottom: 64px;
}
.hero .eyebrow {
	font-weight: 700;
	color: var(--gold-dark);
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .85rem;
	margin-bottom: 12px;
}
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero .mascot { justify-self: center; width: min(100%, 360px); }
.hero .steps {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 28px;
	margin-bottom: 18px;
}
.hero .steps span { width: 10px; background: var(--gold-dark); border-radius: 2px; }
.hero .steps span:nth-child(1) { height: 40%; }
.hero .steps span:nth-child(2) { height: 70%; }
.hero .steps span:nth-child(3) { height: 100%; }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 30px; }
.section-head p { color: var(--muted); }

.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
}
.card .num {
	display: inline-flex;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--teal);
	color: #fff;
	font-weight: 800;
	margin-bottom: 12px;
}
.card p { color: var(--muted); margin: 0; }

.topics {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 14px;
}
.topic {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	background: var(--white);
	border: 1px solid var(--line);
	border-left: 5px solid var(--teal);
	border-radius: 10px;
	text-decoration: none;
	color: var(--teal-dark);
	font-weight: 700;
}
.topic:hover { border-left-color: var(--gold); }
.topic .count { color: var(--gold-dark); font-size: .9rem; white-space: nowrap; }

.first-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.first-lessons li {
	display: flex;
	gap: 14px;
	align-items: baseline;
	padding: 14px 18px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--white);
}
.first-lessons .day { color: var(--gold-dark); font-weight: 800; white-space: nowrap; min-width: 6.5em; }

.notice {
	background: var(--teal-dark);
	color: var(--cream);
	padding: 28px 0;
}
.notice .wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.notice strong { color: var(--gold); font-size: 1.15rem; }
.notice a { color: var(--cream); }

/* Lessons page */
.page-hero { background: var(--cream); border-bottom: 1px solid var(--line); padding: 48px 0 36px; }
.page-hero p { color: var(--muted); max-width: 44em; }
.lesson-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.lesson-tools input {
	font: inherit;
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	min-width: min(100%, 360px);
	background: var(--white);
}
.lesson-tools .hint { color: var(--muted); font-size: .95rem; }
.topic-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.topic-nav a {
	text-decoration: none;
	font-size: .9rem;
	padding: 6px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--white);
	color: var(--teal-dark);
}
.lesson-group { padding-top: 34px; }
.lesson-group h2 { font-size: 1.5rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.lesson-group h2 small { color: var(--gold-dark); font-size: .95rem; font-weight: 700; }
.lesson-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lesson-list li {
	display: grid;
	grid-template-columns: 5.5em 1fr auto;
	gap: 12px;
	align-items: baseline;
	padding: 11px 4px;
	border-bottom: 1px solid var(--line);
}
.lesson-list .nr { color: var(--gold-dark); font-weight: 700; font-size: .95rem; }
.lesson-list .status { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.lesson-list .status a { font-weight: 700; }
.no-results { display: none; color: var(--muted); padding: 24px 0; }

/* Text pages */
.content { padding: 48px 0 64px; }
.content .wrap { max-width: 820px; }
.content h2 { font-size: 1.4rem; margin-top: 1.6em; }
.content h3 { margin-top: 1.4em; }
.content ul { padding-left: 1.2em; }
.content .meta { color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer {
	background: var(--night);
	color: #C9D6D9;
	padding: 44px 0 30px;
	font-size: .95rem;
}
.site-footer a { color: #E6EEF0; }
.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 28px;
}
.footer-grid h3 { color: var(--gold); font-size: 1rem; margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-brand img { width: 220px; margin-bottom: 14px; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.12);
	margin-top: 28px;
	padding-top: 18px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: space-between;
}

.stat-optout {
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 14px 18px;
	background: var(--cream);
}
.stat-optout .stat-status { margin: 0 0 10px; }
.stat-optout button { font: inherit; cursor: pointer; }

.withdraw-btn {
	border: 1px solid rgba(255,255,255,.4);
	border-radius: 999px;
	padding: 4px 12px;
	text-decoration: none;
	font-size: .9rem;
}

.course-teaser {
	display: grid;
	grid-template-columns: 1.2fr .8fr;
	gap: 28px;
	align-items: center;
}
.course-teaser ul { padding-left: 1.2em; color: var(--muted); }

@media (max-width: 860px) {
	.course-teaser { grid-template-columns: 1fr; }
	.hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
	.hero .mascot { width: 220px; grid-row: 1; }
	.cards { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.brand { width: 180px; }
	.lesson-list li { grid-template-columns: 4.5em 1fr; }
	.lesson-list .status { grid-column: 2; }
}

@media (max-width: 520px) {
	body { font-size: 17px; }
	.site-header .wrap { flex-direction: column; align-items: flex-start; padding-top: 10px; padding-bottom: 8px; }
	.nav { justify-content: flex-start; }
	.first-lessons li { flex-direction: column; gap: 2px; }
}
