/* Design tokens taken from the original eLearnGrapher (Kadence) site. */
:root {
    --color-accent: #049f82;
    --color-accent-dark: #008f72;
    --color-heading: #222222;
    --color-text: #353535;
    --color-muted: #676767;
    --color-border: #eeeeee;
    --color-bg: #ffffff;
    --color-bg-light: #f7f7f7;
    --color-dark: #222222;

    --font-body: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-heading: "Dela Gothic One", Roboto, system-ui, sans-serif;

    --content-width: 1290px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --section-space: clamp(3rem, 7vw, 5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: clip;
}

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

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--color-heading);
    line-height: 1.3;
    margin: 0 0 1rem;
    overflow-wrap: break-word;
    hyphens: auto;
}
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }

a { color: var(--color-accent); }
a:hover { color: var(--color-accent-dark); }

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

section { padding: var(--section-space) 0; }
.band-light { background: var(--color-bg-light); }
.section-title { text-align: center; text-transform: uppercase; margin-bottom: 2rem; }

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border: 2px solid var(--color-accent);
    border-radius: 3px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.95rem;
}
.btn:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: #fff; }
.btn-ghost:hover { background: #fff; border-color: #fff; color: var(--color-heading); }

/* Header: transparent over the hero */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}
.header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}
.brand img { width: clamp(120px, 18vw, 180px); }

.lang-menu {
    position: absolute;
    right: var(--gutter);
    color: #fff;
}
.lang-menu summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.2rem;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary img { transform: rotate(180deg); }
.lang-menu ul {
    position: absolute;
    right: 0;
    margin: 0.25rem 0 0;
    padding: 0.4rem 0;
    list-style: none;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    min-width: 11rem;
}
.lang-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    color: var(--color-text);
    text-decoration: none;
}
.lang-menu a:hover { background: var(--color-bg-light); }
.lang-menu a[aria-current="page"] { color: var(--color-accent); font-weight: 700; }

/* Hero */
.hero {
    position: relative;
    padding: clamp(9rem, 16vw, 12rem) 0 clamp(4rem, 8vw, 6.5rem);
    text-align: center;
    color: #fff;
    background:
        radial-gradient(ellipse at right top, rgba(0, 143, 114, 0.45) 0%, rgba(34, 34, 34, 0.35) 92%),
        linear-gradient(rgba(34, 34, 34, 0.55), rgba(34, 34, 34, 0.55)),
        url("img/hero.jpg") center / cover no-repeat,
        var(--color-dark);
}
.hero .eyebrow {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}
.hero h1 {
    color: #fff;
    font-size: clamp(2.6rem, 8vw, 5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
}
.hero .subtitle { font-size: clamp(1rem, 2vw, 1.2rem); margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* Intro */
.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
.intro-grid p:first-child { margin-top: 0; }
.languages-box {
    background: var(--color-accent);
    color: #fff;
    text-align: center;
    padding: 2rem 1.5rem;
}
.languages-box img { margin: 0 auto 1rem; width: 102px; }
.languages-box p { margin: 0; }

/* Accordion */
.accordion { max-width: 60rem; margin: 0 auto; }
.accordion details { border-bottom: 2px solid var(--color-dark); }
.accordion summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
    font-weight: 700;
    color: var(--color-heading);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before {
    content: "+";
    flex: none;
    width: 1.2rem;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--color-accent);
}
.accordion details[open] summary { color: var(--color-accent-dark); }
.accordion details[open] summary::before { content: "−"; }
.accordion .panel { padding: 0 0.5rem 1.5rem 2.45rem; font-size: 1rem; line-height: 1.5; }
.accordion .panel p { margin-top: 0; }
.accordion figure { margin: 1rem 0 0; }
.accordion figure img { border: 1px solid var(--color-border); }
.accordion figure.narrow { max-width: 30rem; margin-left: auto; margin-right: auto; }

/* How the courses are made */
.how-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 3rem;
}
.how-grid h2 { text-transform: uppercase; }
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.step {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 2rem 1.75rem;
    overflow: hidden;
}
.step-num {
    position: absolute;
    top: -0.5rem;
    right: 1rem;
    font-size: 7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-bg-light);
    z-index: -1;
}
.step { isolation: isolate; }
.step p { margin: 0; font-size: 1rem; }

/* Rhythm & data protection */
.rhythm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
}
.rhythm-grid img { margin: 1.5rem 0; }
.rhythm-grid .square { aspect-ratio: 1; object-fit: cover; width: 100%; margin-top: 0; }

/* Courses */
.course-grid {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1140px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.course img {
    width: min(100%, 200px);
    aspect-ratio: 1;
    margin: 0 auto 1rem;
    border-radius: 50%;
}
.course h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.15rem; }
.course a { color: inherit; text-decoration: none; display: block; }
.course a:hover h3 { color: var(--color-accent); }
.course a:hover img { transform: scale(1.04); }
.course img { transition: transform 0.2s ease; }
.courses-note { text-align: center; color: var(--color-muted); margin: 1.5rem auto 0; }

.demo {
    margin: 2.5rem auto 0;
    max-width: 1140px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    padding: 2rem;
    border-left: 6px solid var(--color-accent);
    background: var(--color-bg-light);
}
.demo h3 { margin-bottom: 0.5rem; }
.demo p { margin: 0; }
.demo .btn { flex: none; }

/* Institutions & contact */
.institutions { background: var(--color-dark); color: #fff; }
.inst-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
    align-items: start;
}
.institutions h2 { color: var(--color-accent); }
.institutions a { color: #fff; }
.contact-label {
    font-family: var(--font-heading);
    color: var(--color-accent);
    margin: 2rem 0 0;
}

.site-footer {
    padding: 1.75rem 0;
    font-size: 0.9rem;
    color: var(--color-muted);
    background: var(--color-bg-light);
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: var(--color-muted); }
.site-footer a:hover { color: var(--color-accent-dark); }

/* Legal notice (<lang>/impressum.html) */
.legal .wrap { max-width: calc(48rem + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }
.legal address { font-style: normal; }
.legal-note { margin-top: 2.5rem; font-size: 0.9rem; color: var(--color-muted); }

/* Root language chooser (index.html) */
.chooser {
    min-height: 100vh;
    display: grid;
    place-content: center;
    text-align: center;
    padding: var(--gutter);
}
.lang-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.lang-list a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid #fff;
    border-radius: 3px;
    color: #fff;
    text-decoration: none;
}
.lang-list a:hover { background: #fff; color: var(--color-heading); }

@media (max-width: 900px) {
    .intro-grid, .how-grid, .rhythm-grid, .inst-grid { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .demo { flex-direction: column; align-items: flex-start; }
    .accordion .panel { padding-left: 0.5rem; }
}

@media (max-width: 560px) {
    body { font-size: 17px; }
    .lang-menu { position: static; }
    .header-inner { justify-content: space-between; }
}
