:root {
    --bg: #0f0b0a;
    --panel: rgba(18, 13, 12, .62);
    --panel-strong: rgba(18, 13, 12, .82);
    --text: #f7efe8;
    --muted: #d6c1b3;
    --accent: #d09a63;
    --accent-soft: rgba(208, 154, 99, .18);
    --line: rgba(255,255,255,.15);
    --shadow: 0 24px 75px rgba(0,0,0,.32);
    --radius: 30px;
    --max: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--text);
    background: var(--bg);
}

body {
    line-height: 1.65;
    background:
        radial-gradient(circle at 50% 0%, rgba(208,154,99,.14), transparent 34rem),
        linear-gradient(180deg, #140f0e 0%, #0f0b0a 52%, #090706 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(9,7,6,.45), rgba(9,7,6,.84)),
        url("/pics/Hintergrund-MainPage.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: .30;
    pointer-events: none;
}

a {
    color: inherit;
}

main {
    overflow-x: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 5vw, 72px);
    background: rgba(9,7,6,.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(1px);

}

.brand {
    display: inline-flex;
    flex-direction: column;
    line-height: .92;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    text-decoration: none;
    letter-spacing: .06em;
    color: white;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    font-size: .96rem;
}

.main-nav a {
    padding: 10px 13px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    transition: color .25s ease, background .25s ease, transform .25s ease;
}

.main-nav a.active,
.main-nav a:hover {
    color: white;
    background: rgba(255,255,255,.08);
    transform: translateY(-1px);
}

.menu-toggle,
.burger {
    display: none;
}

.page {
    width: min(var(--max), calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(58px, 8vw, 104px) 0;
}

.narrow {
    width: min(850px, calc(100% - 36px));
}

.page-hero {
    padding-top: clamp(86px, 12vw, 150px);
    text-align: center;
}

.section-head {
    margin-bottom: 28px;
}

.centered {
    text-align: center;
}

.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(110px, 13vw, 150px) 18px clamp(50px, 8vw, 90px);
    background-image:
        linear-gradient(rgba(7,5,5,.34), rgba(7,5,5,.52)),
        url("/pics/Hintergrund-MainPage.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-copy,
.hero-content {
    width: min(780px, 100%);
    max-width: 780px;
    text-align: center;
    padding: clamp(26px, 5vw, 52px);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 34px;
    background: rgba(7,5,5,.32);
    backdrop-filter: blur(1px);
    box-shadow: 0 22px 70px rgba(0,0,0,.24);
}

.hero-copy h1,
.hero-content h1 {
    font-size: clamp(2.45rem, 7vw, 5.7rem);
    margin-bottom: 26px;
}

.hero-copy p,
.hero-content p,
.hero-text {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.about-hero {
    min-height: calc(100svh - 78px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(84px, 10vw, 140px) 18px;
    background-image:
        linear-gradient(rgba(8,6,5,.42), rgba(8,6,5,.58)),
        url("/pics/DreiTüren.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about-space{
    min-height: calc(100svh - 78px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(84px, 10vw, 140px) 18px;
    background-image: linear-gradient(rgba(8,6,5,.42), rgba(8,6,5,.58)), url("/pics/SpaceShip.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about-panel {
    width: min(850px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background: rgba(7,5,5,.40);
    backdrop-filter: blur(1px);
    box-shadow: var(--shadow);
    text-align: center;
}

.eyebrow,
.date,
.required,
.privacy-note {
    color: var(--accent);
    font-size: .92rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.08;
    margin: 0 0 22px;
    font-weight: 500;
}

h1 {
    font-size: clamp(2.45rem, 7vw, 5.7rem);
}

h2 {
    font-size: clamp(1.9rem, 4.8vw, 3.8rem);
}

h3 {
    font-size: 1.42rem;
}

p {
    margin: 0 0 18px;
    font-size: clamp(1rem, 1.3vw, 1.09rem);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
    gap: clamp(30px, 6vw, 72px);
    align-items: center;
}

.card,
.cover,
.book-card,
.news-card,
.contact-form,
.prose,
.legal,
.soft-panel,
.cta {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(1px);
    box-shadow: var(--shadow);
}

.image-badge {
    background-image: url("/pics/RunderBaum-Badge.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.image-tree {
    background-image: url("/pics/Hintergrund-Uebermich.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.small-visual {
    min-height: 280px;
    margin-top: 28px;
}

.book-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 28px);
    align-items: stretch;
}

.book-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 22px;
    transition: transform .28s ease, border-color .28s ease, background .28s ease;
}

.book-card:hover,
.news-card:hover {
    transform: translateY(-6px);
    border-color: rgba(208,154,99,.42);
    background: rgba(26,19,17,.78);
}

.cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    min-height: 0;
    margin-bottom: 22px;
    padding: clamp(12px, 2.2vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255,255,255,.035);
    border-radius: 20px;
}

.cover img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .35s ease;
}

.book-card:hover .cover img {
    transform: scale(1.035);
}

.book-card h3 {
    margin-bottom: 10px;
}

.book-card p {
    color: var(--muted);
}

.book-card .button,
.book-card .button.disabled {
    margin-top: auto;
    width: fit-content;
}

.news-card,
.contact-form,
.prose,
.legal,
.soft-panel,
.cta {
    padding: clamp(24px, 5vw, 44px);
    margin-top: 2vh;
    margin-bottom: 2vh;
}

.news-list {
    display: grid;
    gap: 24px;
}

.button-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 11px 24px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: #1b100c;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.button:hover,
button:hover {
    transform: translateY(-2px);
    background: #e5b27b;
    box-shadow: 0 10px 28px rgba(208,154,99,.25);
}

.button.secondary,
.button.disabled {
    background: transparent;
    color: var(--text);
}

.button.disabled {
    opacity: .62;
    cursor: default;
}

.cta {
    text-align: center;
    margin-bottom: clamp(38px, 6vw, 76px);
}

.contact-form {
    display: grid;
    gap: 12px;
}

.contact-card {
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(1px);
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-card h2 {
    font-size: clamp(1.8rem, 4.2vw, 3.4rem);
}

.contact-card p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.contact-actions {
    margin-top: 30px;
}

.contact-note {
    margin-top: 28px;
    margin-bottom: 0;
}

label {
    color: var(--muted);
}

input,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(7,5,5,.78);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus,
textarea:focus {
    border-color: rgba(208,154,99,.72);
    box-shadow: 0 0 0 4px rgba(208,154,99,.12);
}

textarea {
    resize: vertical;
}

.validation-message {
    color: #f0a6a6;
    font-size: .95rem;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
}

.check input {
    width: auto;
    margin-top: 7px;
}

.status {
    margin-top: 16px;
    color: var(--accent);
}

.prose h2,
.legal h2 {
    font-size: 1.35rem;
    margin-top: 32px;
    color: var(--accent);
}

.legal p,
.prose p {
    color: var(--muted);
}

.site-footer {
    position: relative;
    overflow: hidden;
    padding: clamp(42px, 6vw, 72px) clamp(18px, 5vw, 72px) 28px;
    border-top: 1px solid var(--line);
    background: linear-gradient(rgba(9,7,6,.82), rgba(9,7,6,.94)), url("/pics/Hintergrund-MainPage.png");
    background-size: cover;
    background-position: center bottom;
    color: var(--muted);
}

.footer-inner {
    width: min(var(--max), 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 32px;
    align-items: start;
}

.footer-brand h2 {
    color: white;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.footer-brand p {
    max-width: 620px;
}

.footer-nav {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.footer-nav a {
    text-decoration: none;
    color: var(--muted);
    transition: color .2s ease, transform .2s ease;
}

.footer-nav a:hover {
    color: white;
    transform: translateX(-3px);
}

.footer-bottom {
    width: min(var(--max), 100%);
    margin: 36px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .92rem;
}

.reveal {
    animation: revealUp .75s ease both;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

@media (max-width: 900px) {
    .site-header {
        flex-wrap: wrap;
    }

    .image-badge {
        background-image: url("/pics/NightPath.jpeg");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .about-hero {
        background-image: linear-gradient(rgba(8,6,5,.42), rgba(8,6,5,.58)), url("/pics/LaptopMobile.png");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .burger {
        display: block;
        margin-left: auto;
        font-size: 1.8rem;
        cursor: pointer;
        color: white;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding-top: 14px;
    }

    .main-nav a {
        padding: 12px 0;
    }

    .image-tree {
        background-image: url("/pics/TreeMobile.png");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .menu-toggle:checked ~ .main-nav {
        display: flex;
    }

    .split,
    .book-row,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        justify-items: start;
    }

    .hero {
        min-height: auto;
        padding: 120px 18px 60px;
        background-position: center;
        background-image: linear-gradient(rgba(7,5,5,.34), rgba(7,5,5,.52)), url("/pics/NightCastleView.jpeg");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .hero-copy,
    .hero-content {
        width: min(100%, 720px);
        padding: 28px;
        border-radius: 26px;
        backdrop-filter: blur(1px);
    }

    .page {
        width: min(100% - 28px, var(--max));
        padding: clamp(46px, 9vw, 78px) 0;
    }

    .about-hero {
        min-height: auto;
        padding: 90px 14px 56px;
    }

    .book-card .button,
    .book-card .button.disabled {
        width: 100%;
    }
}

@media (max-width: 560px) {
    body::before {
        background-attachment: scroll;
    }

    .site-header {
        padding: 14px 16px;
    }

    .image-badge {
        background-image: url("/pics/NightPath.jpeg");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .image-tree {
        background-image: url("/pics/TreeMobile.png");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .hero {
        padding: 105px 14px 44px;
        align-items: flex-start;
        background-image: linear-gradient(rgba(7,5,5,.34), rgba(7,5,5,.52)), url("/pics/NightCastleView.jpeg");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .about-hero {
        background-image: linear-gradient(rgba(8,6,5,.42), rgba(8,6,5,.58)), url("/pics/LaptopMobile.png");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .hero-copy,
    .hero-content,
    .about-panel,
    .news-card,
    .contact-card,
    .contact-form,
    .prose,
    .legal,
    .soft-panel,
    .cta {
        border-radius: 22px;
        padding: 22px;
    }

    .hero-copy,
    .hero-content {
        background: rgba(7,5,5,.38);
    }

    .hero-copy h1,
    .hero-content h1 {
        font-size: clamp(2.35rem, 13vw, 3.6rem);
    }

    .hero-copy p,
    .hero-content p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    .button-row .button {
        width: 100%;
    }

    .image-card {
        min-height: 240px;
    }

    .cover {
        aspect-ratio: 2 / 3;
        padding: 14px;
    }

    .footer-bottom {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
