/* Akademie27: shared look of the new pages (home, contact, imprint, privacy).
   Dark, calm, system fonts. The old pages keep using akademie27.css. */

:root {
    --bg: #0e0f10;
    --text: #ecebe6;
    --soft: #b4b4ae;
    --muted: #7d7e7b;
    --rule: #2a2b2c;
    --field: #161718;
    --mint: #53bfb0;
    --pad-x: clamp(1.25rem, 4.4vw, 3.5rem);
    --pad-y: clamp(1rem, 3.6vh, 2.25rem);
}

/* Both languages are in the markup; <html lang> decides which one shows. */
html[lang="de"] [lang="en"],
html[lang="en"] [lang="de"] { display: none !important; }

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--mint); outline-offset: 4px; }

/* Top bar */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--pad-y) var(--pad-x) 0;
    position: relative;
    z-index: 2;
}

.wordmark {
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .24em;
}
.wordmark span { color: var(--mint); }

.lang-switch {
    display: flex;
    gap: .25rem;
    font-size: .8rem;
    letter-spacing: .14em;
}
.lang-switch a {
    text-decoration: none;
    color: var(--muted);
    padding: .35rem .45rem;
    border-bottom: 1px solid transparent;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="true"] {
    color: var(--text);
    border-bottom-color: var(--text);
}

main {
    flex: 1;
    padding: clamp(.75rem, 2.5vh, 2rem) var(--pad-x);
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 0 0 clamp(1rem, 3vh, 1.75rem);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--soft);
}
.eyebrow::before {
    content: "";
    width: 2rem;
    height: 1px;
    background: var(--mint);
}

h1 {
    margin: 0;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -.022em;
}

.lead {
    margin: clamp(.9rem, 2.4vh, 1.5rem) 0 0;
    max-width: 36rem;
    font-size: clamp(.95rem, 2.2vh, 1.06rem);
    color: var(--soft);
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: .95rem 1.6rem;
    background: var(--text);
    color: var(--bg);
    border: 0;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .02em;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color .2s;
}
.cta:hover, .cta:focus-visible { background: #ffffff; }
.cta .arrow { transition: transform .2s; }
.cta:hover .arrow { transform: translateX(3px); }

/* Footer */
.bottom {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    padding: 0 var(--pad-x) var(--pad-y);
    font-size: .75rem;
    color: var(--muted);
    position: relative;
    z-index: 2;
}
.bottom a { text-decoration: none; }
.bottom a:hover, .bottom a[aria-current="page"] { color: var(--text); }

/* ---------- Home: one screen ---------- */

.home main {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.home .content { max-width: min(37.5rem, 50vw); }
.home .avatar { display: none; }
.home h1 { font-size: clamp(2.1rem, min(4.2vw, 6.8vh), 3.5rem); }
.home h1 .first { display: block; color: var(--muted); font-weight: 500; }
.home h1 .second { display: block; }

.offer {
    margin: clamp(1.25rem, 4vh, 2.5rem) 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--rule);
}
.offer li {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 1.5rem;
    padding: clamp(.55rem, 1.6vh, .85rem) 0;
    border-bottom: 1px solid var(--rule);
    font-size: .94rem;
}
.offer strong { font-weight: 500; }
.offer span { color: var(--soft); }

.action {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    margin-top: clamp(1.25rem, 4vh, 2.5rem);
}
.action small { color: var(--muted); font-size: .82rem; }

/* Portrait: transparent cut-out, standing on the bottom edge */
.portrait {
    position: absolute;
    right: 0;
    bottom: 0;
    height: min(80vh, 52rem);
    height: min(80dvh, 52rem);
    width: auto;
    max-width: 48vw;
    object-fit: contain;
    object-position: right bottom;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* ---------- Inner pages: contact, imprint, privacy ---------- */

.page main { padding-top: clamp(2rem, 7vh, 4.5rem); padding-bottom: clamp(3rem, 9vh, 6rem); }
.page h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page .bottom { padding-top: 1.5rem; border-top: 1px solid var(--rule); margin: 0 var(--pad-x); padding-left: 0; padding-right: 0; }

/* Contact */
.contact {
    display: grid;
    grid-template-columns: minmax(0, 36rem) minmax(0, 18rem);
    gap: clamp(2.5rem, 7vw, 6rem);
    margin-top: clamp(2rem, 5vh, 3rem);
}

.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.field input, .field select, .field textarea {
    width: 100%;
    padding: .8rem .9rem;
    background: var(--field);
    color: var(--text);
    border: 1px solid var(--rule);
    border-radius: 2px;
    font: inherit;
    font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--soft); }
.field ::placeholder { color: var(--muted); }
.form .action { margin-top: .5rem; }

.direct h2 {
    margin: 0 0 1rem;
    font-size: .8rem;
    font-weight: 400;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--soft);
}
.direct dl { margin: 0; border-top: 1px solid var(--rule); }
.direct dt { padding-top: .8rem; font-size: .8rem; color: var(--muted); }
.direct dd { margin: 0; padding: .1rem 0 .8rem; border-bottom: 1px solid var(--rule); }
.direct a { text-decoration: none; }
.direct a:hover { color: var(--mint); }

/* Legal texts */
.legal { max-width: 46rem; margin-top: clamp(1.5rem, 4vh, 2.5rem); color: var(--soft); font-size: .95rem; line-height: 1.65; }
.legal h2 { margin: 2.5rem 0 .75rem; color: var(--text); font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.legal h3 { margin: 1.75rem 0 .5rem; color: var(--text); font-size: 1rem; font-weight: 500; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal li { margin-bottom: .4rem; }
.legal a { color: var(--text); text-decoration-color: var(--muted); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal a:hover { color: var(--mint); }
.legal strong { color: var(--text); font-weight: 500; }
.note {
    margin: 0 0 2rem;
    padding: .75rem 0 .75rem 1rem;
    border-left: 1px solid var(--mint);
    color: var(--text);
    font-size: .9rem;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
    .home .portrait { display: none; }
    .home .content { max-width: none; }
    .home main { padding-top: 1rem; padding-bottom: 1rem; }
    .home .eyebrow { margin-bottom: .9rem; }
    .home .eyebrow::before { display: none; }
    .home .avatar {
        display: block;
        flex: none;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 50%;
        overflow: hidden;
        background: #1b1c1d;
    }
    /* Zoom the cut-out so the face fills the circle */
    .home .avatar img {
        display: block;
        width: 220%;
        height: auto;
        margin: -30% 0 0 -66%;
    }
    .home h1 { font-size: clamp(1.75rem, min(8vw, 4.1vh), 2.2rem); }
    .home .lead { margin-top: .9rem; font-size: .9rem; line-height: 1.45; }
    .offer { margin-top: 1.1rem; }
    .offer li { grid-template-columns: 1fr; gap: 0; padding: .5rem 0; font-size: .86rem; line-height: 1.4; }
    .action { margin-top: 1.1rem; gap: .5rem; flex-direction: column; align-items: stretch; text-align: center; }
    .cta { justify-content: center; }

    .contact { grid-template-columns: 1fr; }
}

/* Short, wide screens (small laptops): tighten the home page */
@media (min-width: 761px) and (max-height: 800px) {
    .offer li { padding: .45rem 0; font-size: .88rem; }
    .home .lead { font-size: .92rem; }
}

/* Short phones */
@media (max-width: 760px) and (max-height: 760px) {
    .home .eyebrow { margin-bottom: .6rem; }
    .home .lead { font-size: .85rem; }
    .offer li { padding: .35rem 0; font-size: .82rem; }
    .home .action small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cta, .cta .arrow { transition: none; }
}

/* Open points in legal texts that Rudi still has to confirm; must be gone before going live */
.todo { background: #3a3315; color: #f2dc8a; padding: 0 .25em; }
