/* =========================================================
   M & S Bau Lichtenau – Design System
   ========================================================= */

:root {
    --blue-900: #0a3a57;
    --blue-700: #0b6192;
    --blue-600: #0d72ab;
    --blue-100: #e6f1f8;
    --amber-500: #f0890c;
    --amber-400: #f7a833;
    --ink: #16222b;
    --ink-soft: #45525c;
    --muted: #6b7780;
    --line: #e3e8ec;
    --bg: #ffffff;
    --bg-alt: #f5f8fa;
    --white: #ffffff;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(16, 34, 43, .08);
    --shadow: 0 12px 30px -12px rgba(11, 60, 90, .25);
    --shadow-lg: 0 30px 60px -20px rgba(11, 60, 90, .35);
    --container: 1140px;
    --font-body: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-head: 'Sora', var(--font-body);
    --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--blue-700); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--amber-500); }
img, svg, iframe { max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--blue-900); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
    text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700;
    color: var(--amber-500); margin: 0 0 .6rem;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    font-family: var(--font-body); font-weight: 700; font-size: 1rem;
    padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
    cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
    white-space: nowrap;
}
.btn i { font-size: 1rem; }
.btn--primary { background: var(--amber-500); color: #fff; box-shadow: 0 10px 24px -8px rgba(240, 137, 12, .6); }
.btn--primary:hover { background: var(--amber-400); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn--ghost:hover { background: #fff; color: var(--blue-900); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ----------------------------- Header ----------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line); transition: box-shadow .25s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand-mark {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
    color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .9rem; letter-spacing: -.03em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-head); font-size: 1.1rem; color: var(--ink); }
.brand-text small { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

.main-nav { display: flex; align-items: center; gap: .35rem; }
.main-nav > a { padding: .55rem .85rem; border-radius: 9px; font-weight: 600; color: var(--ink-soft); }
.main-nav > a:hover { color: var(--blue-700); background: var(--blue-100); }
.nav-cta {
    margin-left: .5rem; display: inline-flex; align-items: center; gap: .45rem;
    background: var(--blue-700); color: #fff !important; padding: .6rem 1.1rem !important; border-radius: 999px !important;
    font-weight: 700;
    transition: background .2s var(--ease) !important;
}
.nav-cta:hover { background: var(--blue-900) !important; }
.nav-cta i { font-size: .9rem; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; border-radius: 10px; }
.nav-toggle span { display: block; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ----------------------------- Hero ----------------------------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(240, 137, 12, .35), transparent 60%),
        linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 55%, var(--blue-600) 100%);
}
.hero-bg::after {
    content: ""; position: absolute; inset: 0; opacity: .12;
    background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
}
.hero-inner {
    position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px;
    align-items: center; padding: clamp(3rem, 7vw, 5.5rem) 24px;
}
.hero-content .eyebrow { color: var(--amber-400); }
.hero h1 { color: #fff; }
.hero h1 span { color: var(--amber-400); }
.hero-lead { font-size: 1.12rem; color: rgba(255, 255, 255, .9); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.hero-badges li { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .92rem; color: rgba(255,255,255,.92); }
.hero-badges i { font-size: 1.05rem; color: var(--amber-400); }

.hero-media {
    aspect-ratio: 4 / 5; border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: var(--shadow-lg); padding: 14px;
}
.hero-media img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    border-radius: calc(var(--radius-lg) - 8px);
}

/* ----------------------------- Sections ----------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-sub { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ----------------------------- Services ----------------------------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.service-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 2rem; box-shadow: var(--shadow-sm); position: relative;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease) !important;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-icon {
    width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1.1rem;
    background: linear-gradient(135deg, var(--blue-100), #fff); color: var(--blue-700);
    border: 1px solid var(--line);
}
.service-icon i { font-size: 1.6rem; }
.service-lead { color: var(--ink-soft); }
.service-list { margin: 1.1rem 0 1.4rem; display: grid; gap: .5rem; }
.service-list li { position: relative; padding-left: 1.6rem; color: var(--ink-soft); }
.service-list li::before {
    content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%;
    background: var(--amber-500);
}
.service-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.service-link i { font-size: .95rem; transition: transform .2s var(--ease); }
.service-link:hover i { transform: translateX(4px); }

/* ----------------------------- About ----------------------------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.about-media {
    aspect-ratio: 4 / 3; border-radius: var(--radius-lg); box-shadow: var(--shadow);
    border: 1px solid var(--line); overflow: hidden;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-points { display: grid; gap: 1.1rem; margin: 1.5rem 0 2rem; }
.about-points li { display: flex; gap: .85rem; align-items: flex-start; color: var(--ink-soft); }
.about-points li > i { flex: 0 0 auto; margin-top: .2rem; font-size: 1.4rem; color: var(--amber-500); line-height: 1; }
.about-points li strong { display: block; color: var(--ink); font-family: var(--font-head); font-size: 1.05rem; margin-bottom: .15rem; }

/* ----------------------------- Steps ----------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; list-style: none; margin: 0; padding: 0; }
.step {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.8rem 1.5rem; box-shadow: var(--shadow-sm); position: relative;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease) !important;
}
.step-num {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: #fff; margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
}
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--muted); margin: 0; font-size: .96rem; }

.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* ----------------------------- Contact ----------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: start; }
.contact-list { display: grid; gap: 1.2rem; margin-bottom: 1.6rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-ico {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--blue-100); color: var(--blue-700);
}
.contact-ico i { font-size: 1.15rem; }
.contact-list strong { display: block; font-family: var(--font-head); color: var(--ink); margin-bottom: .1rem; }
.hours-row { display: flex; justify-content: space-between; gap: 1rem; max-width: 280px; color: var(--ink-soft); font-size: .95rem; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-embed iframe { display: block; width: 100%; height: 240px; border: 0; }
.map-link { display: block; text-align: center; padding: .6rem; background: var(--bg-alt); font-weight: 600; font-size: .9rem; }

/* ----------------------------- Form ----------------------------- */
.contact-form-wrap {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--ink); }
.form-field input, .form-field textarea {
    width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 11px;
    font: inherit; color: var(--ink); background: #fcfdfe; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-field input:focus, .form-field textarea:focus {
    outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(13, 114, 171, .12); background: #fff;
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field.has-error input, .form-field.has-error textarea { border-color: #d6453a; background: #fef6f5; }
.field-error { display: block; color: #d6453a; font-size: .85rem; margin-top: .35rem; font-weight: 600; }

.form-consent { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.form-consent input { margin-top: .25rem; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--blue-700); }
.form-consent.has-error span { color: #d6453a; }
.form-note { font-size: .82rem; color: var(--muted); margin: .9rem 0 0; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.alert strong { font-family: var(--font-head); display: block; margin-bottom: .25rem; }
.alert p { margin: 0; }
.alert--success { background: #eaf7ee; border: 1px solid #b8e3c4; color: #1d6b39; }
.alert--error { background: #fdeeec; border: 1px solid #f4c4bd; color: #b23227; margin-bottom: 1.4rem; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { background: var(--blue-900); color: rgba(255, 255, 255, .8); padding-top: 3.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 2.5rem; }
.brand--footer .brand-text strong { color: #fff; }
.brand--footer .brand-text small { color: rgba(255,255,255,.6); }
.footer-claim { margin-top: 1rem; max-width: 32ch; color: rgba(255, 255, 255, .7); }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: .55rem; }
.footer-col a { color: rgba(255, 255, 255, .8); }
.footer-col a:hover { color: var(--amber-400); }
.footer-contact li { margin-bottom: .55rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.3rem 0; font-size: .88rem; color: rgba(255, 255, 255, .6); }

/* ----------------------------- Floating Call ----------------------------- */
.float-call {
    position: fixed; right: 18px; bottom: 18px; z-index: 90; display: none;
    width: 56px; height: 56px; border-radius: 50%; background: var(--amber-500); color: #fff;
    place-items: center; box-shadow: 0 12px 26px -8px rgba(240, 137, 12, .7);
    animation: pulse 2.4s infinite;
}
.float-call i { font-size: 1.4rem; }
@keyframes pulse { 0%, 100% { box-shadow: 0 12px 26px -8px rgba(240,137,12,.7), 0 0 0 0 rgba(240,137,12,.5); } 50% { box-shadow: 0 12px 26px -8px rgba(240,137,12,.7), 0 0 0 14px rgba(240,137,12,0); } }

/* ----------------------------- Legal pages ----------------------------- */
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal-content h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.legal-content p, .legal-content li { color: var(--ink-soft); }
.legal-content ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.legal-note { background: #fff8ec; border: 1px solid #f6d99b; border-radius: var(--radius); padding: 1rem 1.3rem; color: #8a5a09; font-size: .92rem; }

/* ----------------------------- Reveal animation ----------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-media { max-width: 420px; aspect-ratio: 16 / 11; }
    .about-grid { grid-template-columns: 1fr; }
    .about-media { aspect-ratio: 16 / 10; max-height: 320px; }
    .contact-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; inset: 74px 0 auto; background: #fff; border-bottom: 1px solid var(--line);
        flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 24px 1.2rem;
        box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .3s var(--ease);
        max-height: calc(100vh - 74px); overflow-y: auto;
    }
    .main-nav.is-open { transform: translateY(0); }
    .main-nav > a { padding: .9rem .4rem; border-radius: 8px; border-bottom: 1px solid var(--line); }
    .nav-cta { margin: .8rem 0 0; justify-content: center; }
    .float-call { display: grid; }
    .services-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
    .steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
