/* fewo-madersbacher.de – ein Stylesheet, keine externen Schriften. */

:root {
    --bg: #faf7f1;
    --surface: #ffffff;
    --tint: #f2ece1;
    --line: #e3d9c8;
    --text: #25302a;
    --muted: #5b655e;
    --green: #2f4a3a;
    --green-dark: #1f3328;
    --wood: #8f5520;
    --focus: #c07a2c;

    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

    --radius: 0.625rem;
    --gutter: clamp(1rem, 4vw, 2rem);
    --shadow: 0 1px 2px rgb(37 48 42 / 0.06), 0 6px 20px rgb(37 48 42 / 0.07);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-wrap: break-word;
    /* Fuß bleibt auch bei kurzen Seiten am unteren Rand. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

picture {
    display: block;
}

h1,
h2,
h3 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.2;
    color: var(--green-dark);
    text-wrap: balance;
}

h1 {
    font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
    margin: 0 0 0.75rem;
}

h2 {
    font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
    margin: 0 0 1rem;
}

h3 {
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
}

p,
ul,
dl,
address {
    margin: 0 0 1rem;
}

address {
    font-style: normal;
}

a {
    color: var(--wood);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--green);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 2px;
}

.container {
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.narrow {
    max-width: 46rem;
}

.lead {
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    color: var(--muted);
    max-width: 40rem;
}

.note {
    font-size: 0.925rem;
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wood);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: 0.6rem 1rem;
    background: var(--green);
    color: #fff;
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 1rem;
}

/* --- Kopf und Navigation ------------------------------------------------ */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-block: 0.75rem;
}

.brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--green-dark);
    line-height: 1.2;
    padding-block: 0.25rem;
}

.brand__name {
    font-family: var(--font-head);
    font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.3rem);
    font-weight: 600;
}

.brand__place {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.site-nav a:hover {
    background: var(--tint);
    color: var(--green-dark);
}

.site-nav a[aria-current="page"] {
    background: var(--tint);
    color: var(--green-dark);
    box-shadow: inset 0 -2px 0 var(--wood);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--green-dark);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle[hidden] {
    display: none;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.nav-toggle__bars {
    position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle__bars::before {
    top: -6px;
}

.nav-toggle__bars::after {
    top: 6px;
}

/* Mobil mit JavaScript: Navigation einklappbar. Ohne JS bleibt sie sichtbar. */
@media (max-width: 55.99rem) {
    .js .site-nav {
        display: none;
        flex-basis: 100%;
    }

    .js .site-nav.is-open {
        display: block;
    }

    .js .site-nav ul {
        flex-direction: column;
        padding-block: 0.25rem 0.5rem;
    }

    .js .site-nav a {
        padding: 0.75rem 0.9rem;
    }
}

@media (max-width: 25.99rem) {
    .nav-toggle {
        padding-inline: 0.8rem;
    }

    .nav-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media (min-width: 56rem) {
    .nav-toggle {
        display: none;
    }
}

/* --- Abschnitte ------------------------------------------------------------ */

.section {
    padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.section--compact {
    padding-block: clamp(1.5rem, 1.2rem + 2vw, 2.75rem);
}

.section--tinted {
    background: var(--tint);
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1.5rem;
    margin-bottom: 1rem;
}

.section__head h2 {
    margin: 0;
}

.page-intro {
    padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem) clamp(0.5rem, 1vw, 1rem);
}

.page-intro .lead {
    margin-bottom: 0.5rem;
}

.hero {
    padding-block: clamp(2rem, 1.5rem + 4vw, 4.5rem);
}

.hero__grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 56rem) {
    .hero__grid {
        grid-template-columns: 1.15fr 1fr;
        gap: 3.5rem;
    }
}

.hero__image {
    margin: 0;
    max-width: 32rem;
    justify-self: center;
    width: 100%;
}

.hero__image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero__image figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
}

.split {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 48rem) {
    .split {
        grid-template-columns: 1fr 1fr;
    }
}

.stack {
    display: grid;
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}

.card > :last-child {
    margin-bottom: 0;
}

.prose {
    max-width: 46rem;
}

.prose h2 {
    margin-top: 2.5rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 1.75rem;
}

.prose ul {
    padding-left: 1.25rem;
}

.prose li + li {
    margin-top: 0.35rem;
}

/* --- Bausteine ------------------------------------------------------------- */

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--green);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--green-dark);
    font-weight: 600;
    text-decoration: none;
    line-height: 1.25;
    text-align: center;
}

.button:hover {
    background: var(--tint);
    color: var(--green-dark);
}

.button--primary {
    background: var(--green);
    color: #fff;
}

.button--primary:hover {
    background: var(--green-dark);
    color: #fff;
}

.text-link {
    font-weight: 600;
}

.text-link::after {
    content: " →";
}

.features {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

@media (min-width: 48rem) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    border-top: 3px solid var(--wood);
}

.feature p {
    margin: 0;
    color: var(--muted);
}

.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.75rem;
    border-bottom: 1px solid var(--line);
}

.check-list li:last-child {
    border-bottom: 0;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.95rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--wood);
}

.address-large {
    font-size: 1.15rem;
    line-height: 1.6;
}

.contact-list {
    margin: 0;
}

.contact-list div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.5rem;
    padding-block: 0.6rem;
    border-bottom: 1px solid var(--line);
}

.contact-list div:last-child {
    border-bottom: 0;
}

.contact-list dt {
    color: var(--muted);
}

.contact-list dd {
    margin: 0;
    font-weight: 600;
}

.contact-card {
    background: var(--green);
    color: #eef3ee;
    border-radius: var(--radius);
    padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem);
}

.contact-card h2 {
    color: #fff;
}

.contact-card p {
    max-width: 40rem;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.contact-card .button {
    border-color: rgb(255 255 255 / 0.55);
    background: transparent;
    color: #fff;
}

.contact-card .button:hover {
    background: rgb(255 255 255 / 0.12);
}

.contact-card .button--primary {
    background: #fff;
    color: var(--green-dark);
    border-color: #fff;
}

.contact-card .button--primary:hover {
    background: var(--tint);
}

.button__label {
    font-weight: 400;
    opacity: 0.85;
}

.chips ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.chips a {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    min-height: 2.5rem;
    line-height: 1.6;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--green-dark);
    text-decoration: none;
    font-size: 0.95rem;
}

.chips a:hover {
    border-color: var(--green);
}

/* --- Galerie ---------------------------------------------------------------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

#umgebung-titel + .gallery {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
}

.gallery a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--line);
    aspect-ratio: 4 / 3;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.gallery a:hover img {
    opacity: 0.88;
}

.video-link {
    position: relative;
    display: block;
    max-width: 500px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.video-link__label {
    display: block;
    padding: 0.8rem 1rem;
    background: var(--green);
    color: #fff;
    font-weight: 600;
}

.video-link:hover .video-link__label {
    background: var(--green-dark);
}

.partner {
    display: grid;
    gap: 1rem 1.5rem;
}

@media (min-width: 40rem) {
    .partner {
        grid-template-columns: 11rem 1fr;
        align-items: start;
    }
}

.partner__logo img {
    max-width: 11rem;
}

.partner h2 {
    font-size: 1.35rem;
}

/* --- Fuß -------------------------------------------------------------------- */

.site-footer {
    background: var(--green-dark);
    color: #d9e2da;
    padding-top: 2.5rem;
    font-size: 0.975rem;
}

.site-footer a {
    color: #fff;
}

.site-footer a:hover {
    color: #f3d9b8;
}

.site-footer__grid {
    display: grid;
    gap: 1.5rem 2rem;
}

@media (min-width: 40rem) {
    .site-footer__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.site-footer__title {
    margin-bottom: 0.4rem;
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: #fff;
}

.site-footer__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__list a {
    display: inline-block;
    padding-block: 0.3rem;
}

.site-footer__bottom {
    margin-top: 2rem;
    padding-block: 1rem;
    border-top: 1px solid rgb(255 255 255 / 0.15);
    font-size: 0.875rem;
    color: #aebcb1;
}

.site-footer__bottom p {
    margin: 0;
}

/* --- Lightbox ---------------------------------------------------------------- */

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgb(12 18 14 / 0.94);
    color: #fff;
}

.lightbox::backdrop {
    background: rgb(12 18 14 / 0.94);
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__figure {
    margin: 0;
    padding: 3.5rem 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 100%;
}

.lightbox__image {
    width: auto;
    height: auto;
    max-width: min(100%, 92vw);
    max-height: calc(100dvh - 8rem);
    border-radius: 4px;
    touch-action: pan-y pinch-zoom;
}

.lightbox__caption {
    margin-top: 0.75rem;
    padding-inline: 3.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: #d9e2da;
}

.lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.14);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__btn:hover {
    background: rgb(255 255 255 / 0.26);
}

.lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
}

.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__prev {
    left: 0.5rem;
}

.lightbox__next {
    right: 0.5rem;
}

@media (max-width: 40rem) {
    .lightbox__prev,
    .lightbox__next {
        top: auto;
        bottom: 0.75rem;
        transform: none;
    }
}

.lightbox__btn[hidden] {
    display: none;
}

@media print {
    .site-header nav,
    .nav-toggle,
    .lightbox {
        display: none !important;
    }
}

.button-row + .note {
    margin-top: 0.75rem;
}
