:root {
    --color-bg: #f2f4f7;
    --color-surface: #ffffff;
    --color-text: #18212b;
    --color-muted: #55606d;
    --color-accent: #d64d18;
    --color-border: #d4dbe2;
    --shadow-soft: 0 22px 60px rgba(24, 33, 43, 0.08);
    --radius: 24px;
    --container-width: 1100px;
    --header-offset: 128px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
p,
ul {
    margin-top: 0;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--color-text);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 24%, var(--color-bg) 100%);
}

body.has-solid-header {
    padding-top: calc(var(--header-offset) + 1rem);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(calc(100% - 2rem), var(--container-width));
    margin: 0 auto;
}

#meisterwerkstatt,
#leistungen,
#kontakt {
    scroll-margin-top: calc(var(--header-offset) + 1rem);
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 100%;
    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        backdrop-filter 180ms ease,
        -webkit-backdrop-filter 180ms ease;
}

.is-measuring-header .site-header::before,
.is-measuring-header .header-inner,
.is-measuring-header .brand-logo,
.is-measuring-header .nav-button {
    transition: none !important;
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.75rem;
    width: 100%;
    padding: 1.0rem 2.0rem 0.3rem;
    transition: padding 180ms ease, gap 180ms ease;
}

.has-hero-header .site-header::before {
    background-color: transparent;
}

.has-hero-header.is-scrolled .site-header::before {
    background: linear-gradient(180deg, rgba(10, 14, 18, 0.76), rgba(10, 14, 18, 0.48));
    box-shadow: 0 12px 30px rgba(4, 6, 8, 0.2);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    backdrop-filter: blur(16px) saturate(145%);
}

.has-solid-header .site-header::before {
    background-color: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.brand-logo-link {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin: 0;
    line-height: 0;
}

.brand-logo {
    width: min(340px, 28vw);
    height: auto;
    filter: brightness(0) invert(1) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transition: width 180ms ease, filter 180ms ease;
}

.has-solid-header .brand-logo {
    filter: none;
}

.has-solid-header .nav-button {
    color: var(--color-text);
    text-shadow: none;
}

.has-solid-header .nav-button:hover,
.has-solid-header .nav-button:focus-visible {
    color: var(--color-accent);
}

.section-nav {
    position: relative;
    z-index: 1;
    margin-left: auto;
}

.menu-toggle {
    display: none;
    position: relative;
    z-index: 2;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    margin-left: auto;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    transform: translateY(-1px);
}

.menu-toggle:focus-visible {
    outline: none;
}

.menu-toggle-bar {
    position: absolute;
    width: 1.3rem;
    height: 2px;
    border-radius: 999px;
    background-color: currentColor;
    transition:
        transform 180ms ease,
        opacity 180ms ease,
        background-color 180ms ease;
}

.menu-toggle-bar:nth-child(1) {
    transform: translateY(-0.38rem);
}

.menu-toggle-bar:nth-child(2) {
    transform: translateY(0);
}

.menu-toggle-bar:nth-child(3) {
    transform: translateY(0.38rem);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-list li {
    display: flex;
}

.nav-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0.85rem 1.2rem;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    transition:
        transform 180ms ease,
        color 180ms ease,
        opacity 180ms ease,
        min-height 180ms ease,
        padding 180ms ease,
        font-size 180ms ease;
}

.nav-button::after {
    content: "";
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 0.45rem;
    height: 2px;
    background-color: #ffffff;
    opacity: 0;
    transform: scaleX(0.35);
    transform-origin: center;
    transition: opacity 180ms ease, transform 180ms ease;
}

.nav-button:hover,
.nav-button:focus-visible {
    transform: translateY(-1px);
    color: #ffd8c9;
}

.nav-button.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-button--primary {
    background-color: #0074d9;
    color: #ffffff;
    border-radius: 0.25rem;
    box-shadow: 0 8px 18px rgba(0, 116, 217, 0.18);
}

.nav-button--primary:hover,
.nav-button--primary:focus-visible {
    background-color: #005bb5;
    color: #ffffff;
}

.is-scrolled .header-inner {
    gap: 0.75rem 1.4rem;
    padding: 0.45rem 2rem 0.15rem;
}

.is-scrolled .brand-logo {
    width: min(220px, 17vw);
}

.is-scrolled .nav-button {
    min-height: 46px;
    padding: 0.55rem 1rem;
    font-size: 0.98rem;
}

.site-main {
    padding: 0 0 4rem;
}

.hero {
    min-height: clamp(420px, 60vw, 760px);
    background:
        linear-gradient(180deg, rgba(7, 10, 14, 0.38) 0%, rgba(7, 10, 14, 0.08) 28%, rgba(7, 10, 14, 0.38) 100%),
        url("../images/WebsiteCroppedBlurred.jpg") center 28% / cover no-repeat;
    display: flex;
    align-items: flex-end;
}

.hero-offer-shell {
    width: 100%;
    padding-bottom: clamp(2rem, 5vw, 4.5rem);
    display: flex;
    justify-content: center;
}

.hero-offer {
    width: min(100%, 36rem);
    padding: 1.8rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(12, 18, 24, 0.82);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    backdrop-filter: blur(4px);
    text-align: center;
}

.hero-offer p {
    margin: 0;
}

.hero-offer-kicker {
    margin-bottom: 0.65rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f4c95d;
}

.hero-offer-price {
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
}

.hero-offer-note {
    margin-top: 0.75rem;
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.84);
}

.card h3,
.contact-card strong {
    color: var(--color-text);
}

.content-section h1,
.content-section h2,
.card h3 {
    margin-top: 0;
}

.content-section {
    padding: 2.5rem 0;
}

.meisterwerkstatt-layout {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.info-card,
.team-card {
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.info-card h2,
.team-section h2 {
    margin-bottom: 1rem;
}

.info-card p:not(.lead),
.team-card p {
    margin-bottom: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.team-section {
    display: grid;
    gap: 1.25rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.team-photo {
    display: grid;
    place-items: center;
    min-height: 240px;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: calc(var(--radius) - 6px);
    background: linear-gradient(135deg, rgba(214, 77, 24, 0.08), rgba(24, 33, 43, 0.06));
}

.team-photo img {
    width: 100%;
}

.team-photo span {
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-muted);
    font-weight: 700;
}

.content-section-alt {
    background-color: rgba(255, 255, 255, 0.65);
    border-top: 1px solid rgba(212, 219, 226, 0.9);
    border-bottom: 1px solid rgba(212, 219, 226, 0.9);
}

.section-kicker {
    margin: 0 0 0.75rem;
    color: var(--color-accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-section h1 {
    max-width: 14ch;
    margin-bottom: 1rem;
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    line-height: 0.95;
}

.content-section h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
}

.lead {
    max-width: 62ch;
    color: var(--color-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.card {
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto minmax(360px, auto);
    gap: 1.5rem;
    align-items: stretch;
}

.contact-intro {
    grid-column: 1;
    grid-row: 1;
}

.contact-map,
.contact-card {
    grid-row: 2;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.contact-map {
    grid-column: 1;
    padding: 0;
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    display: block;
}

.contact-card {
    grid-column: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card p,
.contact-card p,
.legal-content p {
    margin-bottom: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.contact-card p + p,
.legal-content p + p {
    margin-top: 0.85rem;
}

.site-footer {
    position: relative;
    color: #f5f7fb;
    background:
        radial-gradient(circle at top left, rgba(214, 77, 24, 0.22), transparent 34%),
        linear-gradient(180deg, #131b23 0%, #0d1319 100%);
}

.footer-shell {
    padding: 2.25rem 0 1.25rem;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    box-shadow: 0 28px 60px rgba(3, 6, 10, 0.28);
}

.footer-brand,
.footer-column {
    display: grid;
    align-content: start;
    gap: 0.95rem;
}

.footer-eyebrow {
    margin: 0;
    color: #ffb89e;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
}

.footer-copy,
.footer-note,
.footer-bottom p {
    margin: 0;
    color: rgba(245, 247, 251, 0.78);
    line-height: 1.65;
}

.footer-note {
    color: #ffd7c7;
    font-weight: 700;
}

.footer-heading {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-list,
.footer-links {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-list li {
    display: grid;
    gap: 0.2rem;
}

.footer-label {
    color: rgba(245, 247, 251, 0.58);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-value {
    color: #ffffff;
    font-weight: 700;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.15rem 0;
    color: #f5f7fb;
    font-weight: 700;
    transition: color 180ms ease, transform 180ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-value:hover,
.footer-value:focus-visible {
    color: #ffb89e;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0 0;
}

.footer-bottom p:last-child {
    text-align: right;
}

.legal-main {
    min-height: calc(100vh - 220px);
}

.legal-section {
    padding-top: 3.25rem;
}

.legal-content {
    max-width: 1040px;
}

.legal-hero {
    max-width: 760px;
    margin-bottom: 2rem;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.legal-card {
    padding: 1.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: var(--shadow-soft);
}

.legal-card h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.25rem, 2.1vw, 1.65rem);
}

.legal-card p {
    margin-bottom: 0;
    color: var(--color-muted);
    line-height: 1.65;
}

.legal-card p + p {
    margin-top: 0.85rem;
}

.legal-card strong {
    color: var(--color-text);
}

.legal-link {
    color: var(--color-accent);
    font-weight: 700;
}

.legal-card-accent {
    background:
        linear-gradient(135deg, rgba(214, 77, 24, 0.08), rgba(255, 255, 255, 0.96));
}

.legal-section--terms {
    padding-top: 3rem;
}

.terms-shell {
    max-width: 1180px;
}

.terms-hero {
    max-width: 860px;
}

.terms-title {
    max-width: 100%;
}

.terms-subtitle {
    margin-bottom: 0.9rem;
}

.terms-note {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.terms-card h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.terms-content {
    max-width: 900px;
}

.terms-card {
    scroll-margin-top: calc(var(--header-offset) + 1.5rem);
}

.terms-card--full {
    padding: 1.8rem;
}

.terms-block + .terms-block {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 219, 226, 0.9);
}

.legal-list {
    margin: 0;
    padding-left: 1.4rem;
    color: var(--color-muted);
}

.legal-list li {
    line-height: 1.7;
}

.legal-list li + li {
    margin-top: 0.9rem;
}

.legal-list--alpha {
    margin-top: 0.85rem;
    padding-left: 1.5rem;
    list-style-type: lower-alpha;
}

.terms-card p,
.terms-card li {
    color: var(--color-muted);
}

.terms-card p {
    margin-bottom: 0;
    line-height: 1.7;
}

.terms-card li > p {
    margin-top: 0.85rem;
}

@media (max-width: 900px) {
    .is-ready .header-inner {
        flex-wrap: nowrap;
        align-items: center;
        padding: 0.35rem 1rem;
    }

    .is-ready .menu-toggle {
        display: inline-flex;
        color: #ffffff;
    }

    .is-ready.has-solid-header .menu-toggle,
    .is-ready.has-hero-header.is-scrolled .menu-toggle,
    .is-ready.is-menu-open .menu-toggle {
        color: var(--color-text);
    }

    .is-ready.has-solid-header .menu-toggle,
    .is-ready.has-hero-header.is-scrolled .menu-toggle,
    .is-ready.is-menu-open .menu-toggle {
        background-color: rgba(255, 255, 255, 0.92);
        border-color: rgba(24, 33, 43, 0.08);
        box-shadow: 0 12px 28px rgba(24, 33, 43, 0.12);
    }

    .is-ready .section-nav {
        position: absolute;
        top: calc(100% + 0.55rem);
        right: 1rem;
        left: 1rem;
        margin-left: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-0.6rem);
        transition:
            opacity 180ms ease,
            visibility 180ms ease,
            transform 180ms ease;
    }

    .is-ready.is-menu-open .section-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .is-ready .nav-list {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        padding: 0.6rem;
        border: 1px solid rgba(24, 33, 43, 0.08);
        border-radius: 24px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
        box-shadow: 0 22px 50px rgba(24, 33, 43, 0.18);
    }

    .is-ready .nav-list li {
        display: flex;
        width: 100%;
    }

    .is-ready .nav-button {
        width: 100%;
        justify-content: flex-start;
        min-height: 52px;
        padding: 0.85rem 1rem;
        border-radius: 18px;
        color: var(--color-text);
        text-shadow: none;
    }

    .is-ready .nav-button::after {
        left: 1rem;
        right: 1rem;
        bottom: 0.6rem;
        background-color: var(--color-accent);
    }

    .is-ready .nav-button:hover,
    .is-ready .nav-button:focus-visible {
        color: var(--color-accent);
        background-color: rgba(214, 77, 24, 0.08);
    }

    .is-ready.is-scrolled .header-inner {
        padding: 0.3rem 1rem;
    }

    .is-ready.is-scrolled .brand-logo {
        width: min(210px, 40vw);
    }

    .legal-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 768px) {
    .is-ready .header-inner {
        padding: 0.2rem 0.8rem;
    }

    .is-ready .section-nav {
        right: 0.8rem;
        left: 0.8rem;
    }

    .contact-grid,
    .card-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .contact-intro,
    .contact-map,
    .contact-card {
        grid-column: auto;
        grid-row: auto;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .footer-top {
        grid-template-columns: 1fr;
        padding: 1.4rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom p:last-child {
        text-align: left;
    }

    .hero {
        min-height: clamp(360px, 78vw, 560px);
        background-position: center 32%;
    }

    .brand-logo {
        width: min(300px, 70vw);
    }

    .is-ready.is-scrolled .header-inner {
        padding: 0.15rem 0.8rem;
    }

    .is-ready.is-scrolled .brand-logo {
        width: min(188px, 48vw);
    }

    .is-ready.is-scrolled .nav-button {
        min-height: 48px;
        padding: 0.7rem 0.95rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(calc(100% - 1.25rem), var(--container-width));
    }

    .brand-logo {
        width: min(260px, 76vw);
    }

    .is-scrolled .brand-logo {
        width: min(172px, 54vw);
    }

    .content-section {
        padding: 2rem 0;
    }

    .lead {
        font-size: 1rem;
    }

    .card,
    .contact-card {
        padding: 1.2rem;
    }

    .terms-card {
        padding: 1.2rem;
    }

    .footer-shell {
        padding-bottom: 1.1rem;
    }
}
