/*
Theme Name: Lernhappen
Theme URI: https://cbj-productions.de
Author: CBJ Productions
Description: Modernes, schlankes Theme für die Lernhappen-Plattform: Code-Eingabe auf der Startseite, Snack-Übersicht, saubere Inhaltsseiten. Schriften lokal eingebunden (DSGVO-freundlich). Am besten zusammen mit dem Plugin „Lernhappen – Chat-Lernsnacks“.
Version: 1.1.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: lernhappen-theme
*/

@font-face { font-family: "Jakarta"; src: url(assets/fonts/jakarta-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(assets/fonts/jakarta-600.woff2) format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(assets/fonts/jakarta-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(assets/fonts/jakarta-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
	--lht-primary: #5b4cf0;
	--lht-accent: #ff7a59;
	--lht-ink: #17153a;
	--lht-ink-2: #3b3960;
	--lht-muted: #6e6c8c;
	--lht-line: #e8e6f4;
	--lht-bg: #f7f6fd;
	--lht-card: #fff;
	--lht-ok: #12a974;
	--lht-radius: 22px;
	--lht-shadow: 0 1px 2px rgba(23, 21, 58, .05), 0 10px 30px rgba(23, 21, 58, .07);
	--lht-shadow-lg: 0 4px 10px rgba(23, 21, 58, .06), 0 30px 70px rgba(23, 21, 58, .14);
	--lht-font: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--lht-wrap: 1180px;
	--lht-primary-soft: color-mix(in srgb, var(--lht-primary) 10%, white);
	--lht-primary-dark: color-mix(in srgb, var(--lht-primary) 82%, black);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; font-family: var(--lht-font); font-size: 17px; line-height: 1.6; color: var(--lht-ink);
	background: var(--lht-bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--lht-primary); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.025em; margin: 0 0 .5em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 16px; border-radius: 10px; }
.lht-wrap { width: 100%; max-width: var(--lht-wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }

/* Buttons */
.lht-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: .75em 1.5em;
	border: 0; border-radius: 999px; background: var(--lht-primary); color: #fff; font: inherit; font-weight: 700; font-size: 16px;
	text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--lht-primary) 32%, transparent);
}
.lht-btn:hover { background: var(--lht-primary-dark); transform: translateY(-1px); }
.lht-btn--ghost { background: #fff; color: var(--lht-ink); box-shadow: var(--lht-shadow); }
.lht-btn--ghost:hover { background: #fff; color: var(--lht-primary); }

/* Header */
.lht-header { position: sticky; top: 0; z-index: 40; background: rgba(247, 246, 253, .78); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.lht-header.is-scrolled { border-bottom-color: var(--lht-line); background: rgba(255, 255, 255, .85); }
.lht-header__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.lht-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--lht-ink); text-decoration: none; letter-spacing: -.02em; }
.lht-logo__mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 18px; background: linear-gradient(135deg, var(--lht-primary), #8f6bff 60%, var(--lht-accent)); box-shadow: 0 6px 14px color-mix(in srgb, var(--lht-primary) 35%, transparent); }
.custom-logo-link img { max-height: 44px; width: auto; display: block; }
.lht-nav { display: flex; align-items: center; gap: 8px; }
.lht-menu, .lht-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.lht-nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--lht-ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.lht-nav a:hover, .lht-nav .current-menu-item > a { background: #fff; color: var(--lht-primary); }
.lht-nav .lht-btn { padding: .55em 1.2em; min-height: 42px; font-size: 15px; color: #fff; margin-left: 6px; }
.lht-nav .lht-btn:hover { color: #fff; }
.lht-burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: #fff; box-shadow: var(--lht-shadow); cursor: pointer; }
.lht-burger span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--lht-ink); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* Hero */
.lht-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 90px) 0 clamp(60px, 8vw, 110px); }
.lht-hero::before {
	content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
	background:
		radial-gradient(700px 420px at 15% 20%, color-mix(in srgb, var(--lht-primary) 18%, transparent) 0%, transparent 70%),
		radial-gradient(600px 400px at 90% 60%, color-mix(in srgb, var(--lht-accent) 20%, transparent) 0%, transparent 70%);
}
.lht-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.lht-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #fff; box-shadow: var(--lht-shadow); font-weight: 700; font-size: 14px; color: var(--lht-primary); margin-bottom: 22px; }
.lht-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lht-ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lht-ok) 22%, transparent); }
.lht-hero h1 { font-size: clamp(38px, 5.6vw, 66px); font-weight: 800; letter-spacing: -.04em; line-height: 1.04; margin-bottom: 20px; }
.lht-hero h1 .lht-grad { background: linear-gradient(100deg, var(--lht-primary), #9a6bff 50%, var(--lht-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lht-hero__sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--lht-muted); max-width: 520px; margin: 0 0 32px; }

.lht-join { display: flex; gap: 8px; padding: 8px; max-width: 480px; background: #fff; border-radius: 999px; box-shadow: var(--lht-shadow-lg); border: 1.5px solid var(--lht-line); transition: border-color .15s, box-shadow .15s; }
.lht-join:focus-within { border-color: var(--lht-primary); box-shadow: var(--lht-shadow-lg), 0 0 0 5px color-mix(in srgb, var(--lht-primary) 14%, transparent); }
.lht-join input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 18px; font: inherit; font-size: 22px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--lht-ink); }
.lht-join input::placeholder { color: #c4c1dc; letter-spacing: .1em; font-weight: 700; }
.lht-join .lht-btn { min-height: 56px; padding: 0 26px; box-shadow: none; }
.lht-join-hint { margin: 14px 0 0 18px; font-size: 14px; color: var(--lht-muted); }
.lht-join-error { margin: 12px 0 0 18px; color: #c2304e; font-weight: 600; font-size: 14px; }

/* Handy-Mockup */
.lht-phone { position: relative; justify-self: center; width: min(360px, 100%); aspect-ratio: 9 / 17.5; padding: 14px; border-radius: 46px; background: #17153a; box-shadow: var(--lht-shadow-lg), inset 0 0 0 2px #2c2960; transform: rotate(2.5deg); }
.lht-phone::before { content: ""; position: absolute; top: 22px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%); background: #17153a; border-radius: 0 0 14px 14px; z-index: 2; }
.lht-phone__screen { height: 100%; border-radius: 34px; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(180deg, #f3f1ff, #fff6f2); }
.lht-phone__top { display: flex; align-items: center; gap: 10px; padding: 44px 16px 12px; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--lht-line); }
.lht-phone__av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lht-primary-soft); font-size: 18px; }
.lht-phone__name { font-weight: 800; font-size: 14px; line-height: 1.2; }
.lht-phone__name small { display: block; color: var(--lht-ok); font-weight: 600; font-size: 11px; }
.lht-phone__chat { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.lht-b { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; background: #fff; box-shadow: 0 2px 8px rgba(23, 21, 58, .06); border-bottom-left-radius: 5px; opacity: 0; animation: lht-pop .5s cubic-bezier(.2, .9, .3, 1.3) forwards; }
.lht-b--me { align-self: flex-end; background: linear-gradient(135deg, var(--lht-primary), #7a5cff); color: #fff; border-radius: 16px; border-bottom-right-radius: 5px; }
.lht-b--ok { background: #e2f7ee; color: #0b5c40; box-shadow: none; }
.lht-b--q { border: 2px solid color-mix(in srgb, var(--lht-primary) 20%, white); }
.lht-b small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lht-primary); }
.lht-b:nth-child(1) { animation-delay: .3s; } .lht-b:nth-child(2) { animation-delay: 1s; } .lht-b:nth-child(3) { animation-delay: 1.8s; } .lht-b:nth-child(4) { animation-delay: 2.6s; } .lht-b:nth-child(5) { animation-delay: 3.3s; }
.lht-phone__opts { padding: 10px 12px 18px; display: grid; gap: 6px; }
.lht-phone__opts span { display: block; padding: 9px 12px; border-radius: 12px; background: #fff; border: 2px solid color-mix(in srgb, var(--lht-primary) 16%, white); font-size: 12.5px; font-weight: 700; }
.lht-float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: var(--lht-shadow-lg); font-weight: 700; font-size: 14px; transform: rotate(-2.5deg); animation: lht-bob 4s ease-in-out infinite; z-index: 3; }
.lht-float b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.lht-float--a { left: -46px; top: 50%; }
.lht-float--a b { background: #fff4d8; }
.lht-float--b { right: -36px; bottom: 16%; animation-delay: -2s; }
.lht-float--b b { background: #e2f7ee; }
.lht-float small { display: block; font-weight: 600; font-size: 12px; color: var(--lht-muted); }

/* Sektionen */
.lht-section { padding: clamp(56px, 8vw, 100px) 0; }
.lht-section--white { background: #fff; }
.lht-section__head { max-width: 640px; margin: 0 auto clamp(30px, 5vw, 50px); text-align: center; }
.lht-section__head h2 { font-size: clamp(30px, 3.8vw, 44px); font-weight: 800; }
.lht-section__head p { color: var(--lht-muted); font-size: 18px; margin: 0; }
.lht-kicker { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lht-primary); margin-bottom: 10px; }

.lht-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.lht-step { position: relative; padding: 30px 26px; border-radius: var(--lht-radius); background: var(--lht-bg); }
.lht-step__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: #fff; box-shadow: var(--lht-shadow); margin-bottom: 18px; }
.lht-step::after { counter-increment: step; content: "0" counter(step); position: absolute; top: 24px; right: 26px; font-weight: 800; font-size: 40px; color: color-mix(in srgb, var(--lht-primary) 12%, transparent); letter-spacing: -.04em; }
.lht-step h3 { font-size: 21px; margin-bottom: 8px; }
.lht-step p { margin: 0; color: var(--lht-muted); font-size: 16px; }

.lht-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.lht-feature { padding: 22px; border-radius: 18px; background: #fff; border: 1.5px solid var(--lht-line); }
.lht-feature b { display: block; font-size: 16px; margin: 8px 0 4px; }
.lht-feature span { color: var(--lht-muted); font-size: 15px; }
.lht-feature i { font-style: normal; font-size: 24px; }

/* Snack-Karten */
.lht-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.lht-card { position: relative; display: flex; flex-direction: column; padding: 22px; border-radius: var(--lht-radius); background: #fff; box-shadow: var(--lht-shadow); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; overflow: hidden; }
.lht-card:hover { transform: translateY(-4px); box-shadow: var(--lht-shadow-lg); }
.lht-card__icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; margin-bottom: 16px; }
.lht-card h3 { font-size: 19px; margin-bottom: 6px; letter-spacing: -.015em; }
.lht-card p { margin: 0 0 18px; color: var(--lht-muted); font-size: 15px; line-height: 1.5; flex: 1; }
.lht-card__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lht-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--lht-bg); color: var(--lht-ink-2); }
.lht-card__go { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lht-bg); color: var(--lht-ink); transition: background .2s, color .2s, transform .2s; }
.lht-card:hover .lht-card__go { background: var(--lht-primary); color: #fff; transform: translateX(3px); }
.tone-violet .lht-card__icon { background: #efedff; } .tone-violet .lht-tag--fach { background: #efedff; color: #4636dc; }
.tone-blue .lht-card__icon { background: #e4f0ff; } .tone-blue .lht-tag--fach { background: #e4f0ff; color: #1d5fc9; }
.tone-mint .lht-card__icon { background: #dff7f2; } .tone-mint .lht-tag--fach { background: #dff7f2; color: #0e7d6a; }
.tone-green .lht-card__icon { background: #e6f6e0; } .tone-green .lht-tag--fach { background: #e6f6e0; color: #3b7d1d; }
.tone-coral .lht-card__icon { background: #ffece6; } .tone-coral .lht-tag--fach { background: #ffece6; color: #c4462a; }
.tone-pink .lht-card__icon { background: #ffe8f1; } .tone-pink .lht-tag--fach { background: #ffe8f1; color: #c42a6a; }
.tone-amber .lht-card__icon { background: #fff4d8; } .tone-amber .lht-tag--fach { background: #fff4d8; color: #8a5a00; }
.lht-center { text-align: center; margin-top: 36px; }

/* Seitenkopf (Archiv, Seiten) */
.lht-pagehead { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); text-align: center; }
.lht-pagehead h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.035em; }
.lht-pagehead p { color: var(--lht-muted); font-size: 18px; margin: 0 auto; max-width: 620px; }
.lht-filter { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.lht-filter a { padding: 8px 16px; border-radius: 999px; background: #fff; box-shadow: var(--lht-shadow); color: var(--lht-ink-2); text-decoration: none; font-weight: 700; font-size: 14px; }
.lht-filter a.is-active, .lht-filter a:hover { background: var(--lht-primary); color: #fff; }

/* Inhalte */
.lht-content { padding-bottom: clamp(50px, 8vw, 100px); }
.lht-entry { max-width: 760px; margin: 0 auto; padding: clamp(26px, 5vw, 56px); background: #fff; border-radius: var(--lht-radius); box-shadow: var(--lht-shadow); }
.lht-entry > *:first-child { margin-top: 0; }
.lht-entry h2 { font-size: 28px; margin-top: 1.6em; }
.lht-entry h3 { font-size: 22px; margin-top: 1.4em; }
.lht-entry blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--lht-primary); color: var(--lht-ink-2); font-size: 1.1em; }
.lht-entry img { border-radius: 14px; }
.lht-entry .alignwide { margin-left: -60px; margin-right: -60px; max-width: calc(100% + 120px); }
.lht-entry table { width: 100%; border-collapse: collapse; }
.lht-entry th, .lht-entry td { padding: 10px; border-bottom: 1px solid var(--lht-line); text-align: left; }
.lht-entry .wp-block-button__link { border-radius: 999px; background: var(--lht-primary); font-weight: 700; }
.lht-meta { color: var(--lht-muted); font-size: 15px; margin-bottom: 18px; }
.lht-list { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.lht-list article { padding: 26px; border-radius: var(--lht-radius); background: #fff; box-shadow: var(--lht-shadow); }
.lht-list h2 { font-size: 24px; margin-bottom: 6px; }
.lht-list h2 a { color: inherit; text-decoration: none; }
.lht-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; }
.lht-pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; background: #fff; box-shadow: var(--lht-shadow); text-decoration: none; color: var(--lht-ink); font-weight: 700; }
.lht-pagination .current { background: var(--lht-primary); color: #fff; }

/* 404 */
.lht-404 { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.lht-404__big { font-size: clamp(90px, 16vw, 180px); font-weight: 800; letter-spacing: -.06em; line-height: 1; background: linear-gradient(100deg, var(--lht-primary), var(--lht-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lht-404 p { color: var(--lht-muted); font-size: 18px; margin: 10px 0 26px; }

/* Footer */
.lht-footer { padding: 40px 0; border-top: 1px solid var(--lht-line); background: #fff; }
.lht-footer__in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 15px; color: var(--lht-muted); }
.lht-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.lht-footer a { color: var(--lht-ink-2); text-decoration: none; font-weight: 600; }
.lht-footer a:hover { color: var(--lht-primary); }
.lht-footer .lht-logo { font-size: 17px; }
.lht-footer .lht-logo__mark { width: 30px; height: 30px; font-size: 15px; border-radius: 10px; }

@keyframes lht-pop { from { opacity: 0; transform: translateY(8px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes lht-bob { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-8px) rotate(-2.5deg); } }

@media (max-width: 960px) {
	.lht-hero__grid { grid-template-columns: 1fr; }
	.lht-hero__text { text-align: center; }
	.lht-hero__sub, .lht-join { margin-left: auto; margin-right: auto; }
	.lht-join-hint, .lht-join-error { margin-left: 0; }
	.lht-phone { width: min(310px, 86%); }
	.lht-float--a { left: -20px; } .lht-float--b { right: -16px; }
	.lht-steps { grid-template-columns: 1fr; }
	.lht-features { grid-template-columns: 1fr 1fr; }
	.lht-entry .alignwide { margin-left: 0; margin-right: 0; max-width: 100%; }
}
@media (max-width: 760px) {
	.lht-burger { display: block; }
	.lht-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 12px 18px 20px; background: #fff; border-bottom: 1px solid var(--lht-line); box-shadow: var(--lht-shadow); }
	.lht-nav.is-open { display: flex; }
	.lht-nav ul, .lht-menu { flex-direction: column; }
	.lht-nav .lht-btn { margin: 8px 0 0; }
	.lht-header.nav-open .lht-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	.lht-header.nav-open .lht-burger span:nth-child(2) { opacity: 0; }
	.lht-header.nav-open .lht-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
	.lht-join input { font-size: 18px; padding: 0 12px; }
	.lht-join .lht-btn { padding: 0 18px; }
	.lht-features { grid-template-columns: 1fr; }
	.lht-float { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* Filter nach Fach + Klasse, Sortierung */
.lht-filter { align-items: center; }
.lht-filter--sub { margin-top: 10px; }
.lht-filter__label { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lht-muted); margin-right: 4px; min-width: 52px; text-align: right; }
.lht-filter--sub a { padding: 6px 13px; font-size: 13.5px; min-width: 38px; text-align: center; }
.lht-sortbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--lht-muted); font-size: 15px; font-weight: 600; }
.lht-sortbar select { margin-left: 6px; font: inherit; font-weight: 700; color: var(--lht-ink); padding: 8px 34px 8px 14px; border-radius: 999px; border: 1.5px solid var(--lht-line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e6c8c' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center; appearance: none; cursor: pointer; }
