/*
Theme Name: DZBD Kurse
Theme URI: https://kurs.das-ziel-bist-du.de/
Author: Das Ziel bist Du
Description: Geschützter Kursbereich für kurs.das-ziel-bist-du.de. Läuft nur auf der Kurs-Instanz, ergänzt das MU-Plugin dzbd-kurs-gateway.
Version: 1.0.0
License: GPL v2 or later
Text Domain: dzbd-kurs
*/

:root {
    --forest: #1b4332;
    --forest-deep: #0f2b20;
    --green: #2d6a4f;
    --mint: #52b788;
    --mint-soft: #b7e4c7;
    --paper: #f8f9fa;
    --editorial: #edeae3;
    --sand: #e6dfd2;
    --ink: #2d2d2d;
    --ink-soft: #5a6058;
    --line: #d9d5cb;
    --gold: #c9963f;
    --black: #141414;
    --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --radius: 4px;
    --shadow: 0 24px 60px -30px rgba(15, 43, 32, 0.45);
    --header-h: 72px;
    --container: 1120px;
}

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

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

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--forest); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--forest); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 1rem; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
p { margin: 0 0 1.15rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.container-narrow { max-width: 760px; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(248, 249, 250, 0.95);
    border-bottom: 1px solid rgba(27, 67, 50, 0.1);
    backdrop-filter: blur(10px);
}
.header-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--forest); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: .78rem; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand small { display: block; font-size: .56rem; letter-spacing: .18em; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.header-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px;
    font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft);
}
.header-nav a:hover { color: var(--green); }
.header-nav .nav-cta { background: var(--black); color: #fff; padding: 10px 18px; }
.header-nav .nav-cta:hover { background: var(--green); color: #fff; }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    padding: clamp(56px, 9vw, 110px) 0 clamp(60px, 9vw, 120px);
    background:
        radial-gradient(circle at 82% 18%, rgba(82, 183, 136, .28), transparent 42%),
        linear-gradient(145deg, var(--forest-deep), var(--forest) 65%, #234d3b);
    color: #fff;
}
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 22px 22px; opacity: .45;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 18px; text-wrap: balance; }
.hero p { max-width: 62ch; color: rgba(255,255,255,.8); font-size: clamp(1rem, 1.4vw, 1.18rem); }
.eyebrow { display: inline-block; margin-bottom: 14px; font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--mint-soft); }
.badge { display: inline-block; padding: 7px 12px; background: var(--mint); color: var(--forest-deep); border-radius: 2px; font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.keywords span { padding: 7px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: rgba(255,255,255,.82); font-size: .75rem; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-editorial { background: var(--editorial); }
.section-kicker { margin: 0 0 8px; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.section-title { margin-bottom: 12px; }
.lead { max-width: 64ch; color: var(--ink-soft); font-size: 1.05rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 13px 26px; border: 1px solid transparent; border-radius: 2px;
    background: var(--black); color: #fff; font-family: var(--sans); font-size: .72rem;
    font-weight: 700; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--green); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: transparent; border-color: var(--forest); color: var(--forest); }
.btn-secondary:hover { background: var(--forest); color: #fff; }
.btn-on-dark { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-on-dark:hover { background: rgba(255,255,255,.14); }

/* Course accordion */
.course { display: grid; gap: 12px; margin-top: 28px; }
.module {
    background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--forest);
    border-radius: var(--radius); overflow: hidden;
}
.module summary {
    cursor: pointer; padding: 18px 20px; font-family: var(--serif); font-size: 1.2rem;
    color: var(--forest); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.module summary::-webkit-details-marker { display: none; }
.module summary::after { content: "+"; font-family: var(--sans); font-size: 1.1rem; color: var(--green); }
.module[open] summary::after { content: "–"; }
.lessons { list-style: none; margin: 0; padding: 0 20px 18px; }
.lessons li { border-top: 1px solid #eeebe4; }
.lessons a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 0; color: var(--ink); font-size: .95rem; }
.lessons a:hover { color: var(--green); }
.lessons a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); flex: 0 0 auto; }

/* Cards */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { padding: 24px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: var(--radius); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Lesson */
.lesson-body { max-width: 760px; }
.lesson-body h2 { margin-top: 2rem; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.lesson-body h3 { margin-top: 1.6rem; font-size: 1.2rem; }
.lesson-body p, .lesson-body li { color: var(--ink-soft); }
.lesson-body ol, .lesson-body ul { padding-left: 1.3rem; }
.lesson-body li { margin-bottom: 6px; }
.lesson-body blockquote { margin: 1.6rem 0; padding: 16px 20px; border-left: 3px solid var(--gold); background: var(--editorial); color: var(--forest); }
.lesson-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Login */
.login-wrap {
    min-height: calc(100vh - var(--header-h));
    display: flex; align-items: center; justify-content: center;
    padding: clamp(28px, 6vw, 72px) 18px;
    background:
        radial-gradient(circle at 78% 18%, rgba(82, 183, 136, .26), transparent 45%),
        linear-gradient(145deg, var(--forest-deep), var(--forest));
}
.login-card { width: min(440px, 100%); padding: clamp(26px, 4vw, 42px); background: var(--paper); border-top: 4px solid var(--mint); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-card h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin-bottom: 10px; }
.login-card .eyebrow { color: var(--green); }
.login-card p { color: var(--ink-soft); font-size: .95rem; }
.login-card form { margin-top: 20px; }
.login-card label { display: block; margin-bottom: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.login-card input[type=text], .login-card input[type=password], .login-card input[type=email] {
    width: 100%; min-height: 48px; padding: 12px 14px; margin-bottom: 14px;
    font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 2px;
}
.login-card input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(82,183,136,.18); }
.login-card .login-submit, .login-card input[type=submit] {
    width: 100%; min-height: 48px; border: 0; border-radius: 2px; background: var(--black); color: #fff;
    font: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}
.login-card .login-submit:hover, .login-card input[type=submit]:hover { background: var(--green); }
.login-links { margin-top: 16px; font-size: .85rem; text-align: center; }
.login-links a { text-decoration: underline; text-underline-offset: 3px; }
.login-remember { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: .875rem; }
.login-remember input { accent-color: var(--green); width: 18px; height: 18px; }
.login-error { padding: 12px 14px; background: #f6e3de; color: #7a2e1e; border-radius: 2px; font-size: .875rem; }

/* Footer */
.site-footer { padding: 40px 0 26px; background: var(--forest-deep); color: rgba(255,255,255,.68); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; justify-content: space-between; }
.footer-brand strong { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.footer-brand p { margin: 6px 0 0; font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .8rem; }
.footer-links a { color: rgba(255,255,255,.72); }
.footer-links a:hover { color: var(--mint-soft); }
.footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: .72rem; color: rgba(255,255,255,.48); }

/* Responsive */
@media (max-width: 720px) {
    :root { --header-h: 64px; }
    .brand span { white-space: nowrap; font-size: .62rem; letter-spacing: .08em; }
    .brand small { display: none; }
    .brand img { width: 32px; height: 32px; }
    .header-nav a { padding: 8px 7px; font-size: .6rem; letter-spacing: .08em; }
    .header-nav .nav-cta { padding: 8px 12px; }
    .hero { padding-top: 44px; }
    .lesson-nav { flex-direction: column; }
    .lesson-nav .btn { width: 100%; }
}

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