/* =====================================================
   RAUM VISION GmbH — design tokens
   ===================================================== */
:root {
    --c-blue: #1B3F6E;
    --c-blue-dark: #15314F;
    --c-blue-light: #2A5A99;
    --c-green: #5CB654;
    --c-green-dark: #4AA042;
    --c-text: #1B2735;
    --c-text-soft: #5C6B7F;
    --c-bg: #ffffff;
    --c-bg-soft: #F4F7FB;
    --c-bg-alt: #EDF2F8;
    --c-border: #E1E8F0;
    --c-accent: var(--c-green);

    --radius: 12px;
    --radius-lg: 18px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(27, 63, 110, 0.06), 0 1px 2px rgba(27, 63, 110, 0.04);
    --shadow: 0 4px 16px rgba(27, 63, 110, 0.08), 0 2px 6px rgba(27, 63, 110, 0.04);
    --shadow-lg: 0 20px 50px rgba(27, 63, 110, 0.15);

    --header-h: 80px;
    --container: 1200px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   Reset / base
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; color: var(--c-blue); font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--c-text-soft); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 8vw, 100px) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head p { font-size: 1.05rem; }
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--c-green);
    margin-bottom: 14px;
}
.lead { font-size: 1.1rem; color: var(--c-text); }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-primary { background: var(--c-green); color: #fff; }
.btn-primary:hover { background: var(--c-green-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.4); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,0.18); border-color: #fff; }

/* =====================================================
   Header
   ===================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
    border-bottom-color: var(--c-border);
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 44px; height: 33px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-title { font-size: 1.35rem; font-weight: 800; color: var(--c-blue); letter-spacing: -0.02em; }
.logo-sub { font-size: 0.78rem; font-weight: 600; color: var(--c-green); letter-spacing: 0.05em; margin-top: 2px; }

.main-nav ul { display: flex; gap: 4px; align-items: center; }
.main-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--c-text);
}
.main-nav a:hover { color: var(--c-green); background: var(--c-bg-soft); }
.has-submenu { position: relative; }
.submenu {
    position: absolute;
    top: 100%; left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
}
.submenu li { display: block; }
.submenu a { padding: 10px 14px; display: block; }
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.header-cta { display: flex; align-items: center; gap: 16px; }
.header-phones { display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; }
.phone-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--c-text); font-weight: 600;
}
.phone-link:hover { color: var(--c-green); }
.phone-link svg { color: var(--c-green); }

.menu-toggle {
    display: none;
    background: none; border: none;
    width: 40px; height: 40px;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; cursor: pointer;
}
.menu-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--c-blue);
    transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================
   Hero
   ===================================================== */
.hero {
    position: relative;
    min-height: 720px;
    padding-top: calc(var(--header-h) + 60px);
    padding-bottom: 80px;
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(105deg, rgba(27,63,110,0.92) 0%, rgba(27,63,110,0.55) 55%, rgba(27,63,110,0.25) 100%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-content { max-width: 720px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--c-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(92, 182, 84, 0.4);
}
.hero h1 {
    color: #fff;
    margin-bottom: 24px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.accent { color: var(--c-green); }
.hero-lead {
    color: rgba(255,255,255,0.92);
    font-size: 1.15rem;
    max-width: 620px;
    margin-bottom: 36px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* =====================================================
   Leistungen — cards
   ===================================================== */
.leistungen { background: var(--c-bg-soft); }
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    scroll-margin-top: calc(var(--header-h) + 20px);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.card-icon {
    width: 64px; height: 64px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.card-icon svg { width: 36px; height: 36px; }
.card-icon-green { background: rgba(92, 182, 84, 0.12); color: var(--c-green); }
.card-icon-blue { background: rgba(27, 63, 110, 0.1); color: var(--c-blue); }
.card h3 { color: var(--c-blue); margin-bottom: 10px; }
.card p { font-size: 0.95rem; margin: 0; }

/* =====================================================
   About
   ===================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: center;
}
.bullet-list { display: grid; gap: 16px; margin-top: 24px; }
.bullet-list li {
    position: relative;
    padding-left: 32px;
    color: var(--c-text-soft);
}
.bullet-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 6px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--c-green);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6l3 3 5-6'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}
.bullet-list strong { color: var(--c-blue); }

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.stat {
    background: var(--c-bg-soft);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--c-border);
}
.stat-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--c-blue);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--c-text-soft);
    line-height: 1.3;
}

/* =====================================================
   Referenzen — gallery
   ===================================================== */
.references { background: var(--c-bg-alt); }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.gallery-item {
    margin: 0;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--c-border);
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #fafbfc;
    padding: 12px;
    transition: transform var(--transition);
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid var(--c-border);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--c-blue);
}
.pdf-link {
    color: var(--c-green);
    font-size: 0.85rem;
    font-weight: 700;
}
.pdf-link:hover { color: var(--c-green-dark); }

/* =====================================================
   Contact
   ===================================================== */
.contact { background: var(--c-bg); }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
}
.contact-list { display: grid; gap: 20px; margin-top: 28px; }
.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.contact-list svg {
    color: var(--c-green);
    flex-shrink: 0;
    margin-top: 2px;
}
.contact-label {
    display: block;
    font-size: 0.78rem;
    color: var(--c-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}
.contact-list a {
    color: var(--c-blue);
    font-weight: 600;
}
.contact-list a:hover { color: var(--c-green); }

.contact-form {
    background: var(--c-bg-soft);
    border-radius: var(--radius-lg);
    padding: 36px;
    border: 1px solid var(--c-border);
}
.form-row { margin-bottom: 18px; }
.form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.contact-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-blue);
    margin-bottom: 6px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--c-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--c-green);
    box-shadow: 0 0 0 3px rgba(92, 182, 84, 0.15);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.form-note {
    font-size: 0.78rem;
    color: var(--c-text-soft);
    margin: 12px 0 0;
}
.form-success {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(92, 182, 84, 0.12);
    color: var(--c-green-dark);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
    background: var(--c-blue-dark);
    color: rgba(255,255,255,0.75);
    padding: 64px 0 24px;
    font-size: 0.93rem;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p { color: rgba(255,255,255,0.7); margin-top: 16px; max-width: 340px; }
.logo-light .logo-title { color: #fff; }
.logo-light .logo-sub { color: var(--c-green); }
.footer-col h4 {
    color: #fff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
    font-weight: 700;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a:hover { color: var(--c-green); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: #fff; }

/* =====================================================
   Modal
   ===================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 26, 42, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    animation: fadeIn 0.2s ease-out;
}
.modal[hidden] { display: none; }
.modal-close {
    position: absolute;
    top: 24px; right: 28px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    line-height: 1;
}
.modal-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }
.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.modal-content img,
.modal-content iframe {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    border: none;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
    .header-phones { display: none; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    :root { --header-h: 70px; }
    .menu-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: #fff;
        padding: 20px 24px 32px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: transform var(--transition);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav ul { flex-direction: column; gap: 4px; align-items: stretch; }
    .main-nav a { padding: 14px 16px; font-size: 1rem; }
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 16px;
    }
    .header-cta .btn { display: none; }
    .header-cta { gap: 8px; }
    .header-phones { display: flex; }
    .mobile-phone { display: none; }
    .header-phones { flex-direction: row; gap: 12px; }
    .hero { min-height: 600px; padding-top: calc(var(--header-h) + 40px); }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { justify-content: center; }
    .about-stats { grid-template-columns: 1fr 1fr; }
    .form-row-split { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .contact-form { padding: 24px; }
}

@media (max-width: 480px) {
    .header-phones { display: none; }
    .container { padding: 0 18px; }
    .section { padding: 56px 0; }
    .section-head { margin-bottom: 36px; }
    .card { padding: 24px 20px; }
}

/* =====================================================
   Legal pages (Impressum / Datenschutz)
   ===================================================== */
.logo-title { white-space: nowrap; }

.legal-main {
    padding-top: calc(var(--header-h) + clamp(32px, 6vw, 64px));
    padding-bottom: clamp(56px, 8vw, 96px);
    background: var(--c-bg-soft);
}
.legal-main .container { max-width: 880px; }

.legal-head { margin-bottom: 32px; }
.legal-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.legal-head p { margin: 8px 0 0; }

.legal-body {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 48px);
    box-shadow: var(--shadow-sm);
}
.legal-body h2 { font-size: 1.35rem; margin: 2em 0 0.6em; padding-top: 1.2em; border-top: 1px solid var(--c-border); }
.legal-body > :first-child { margin-top: 0; }
.legal-body h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal-body h3 { font-size: 1.08rem; color: var(--c-blue); margin: 1.6em 0 0.4em; }
.legal-body p { color: var(--c-text-soft); }
.legal-body strong { color: var(--c-text); }
.legal-body a:not(.btn) { color: var(--c-green-dark); text-decoration: underline; }
.legal-body a:not(.btn):hover { color: var(--c-green); }
.legal-body ul { list-style: disc; padding-left: 1.5em; margin: 0 0 1em; }
.legal-body ul li { margin-bottom: 0.5em; color: var(--c-text-soft); }
.legal-body address {
    font-style: normal;
    color: var(--c-text);
    line-height: 1.75;
    margin: 0 0 1em;
    padding: 16px 20px;
    background: var(--c-bg-soft);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--c-green);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    font-weight: 600;
    color: var(--c-blue);
}
.legal-back:hover { color: var(--c-green); }

/* =====================================================
   A11y — skip link & focus visibility
   ===================================================== */
.skip-link {
    position: absolute;
    left: 8px;
    top: -80px;
    z-index: 200;
    background: var(--c-blue);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top var(--transition);
}
.skip-link:focus { top: 8px; }
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--c-green);
    outline-offset: 2px;
}

/* =====================================================
   Status pages (Danke / 404)
   ===================================================== */
.legal-body-centered { text-align: center; }
.legal-body-centered h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.legal-body-centered p { max-width: 520px; margin: 0 auto 8px; }
.status-icon {
    width: 72px; height: 72px; margin: 0 auto 24px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(92, 182, 84, 0.14);
    color: var(--c-green-dark);
}
.status-icon svg { width: 36px; height: 36px; }
.status-code {
    font-size: clamp(3.5rem, 10vw, 6rem);
    font-weight: 800; line-height: 1;
    color: var(--c-blue); letter-spacing: -0.03em;
    margin-bottom: 8px;
}
.status-actions {
    display: flex; flex-wrap: wrap; gap: 14px;
    justify-content: center; margin-top: 28px;
}
.btn-ghost-dark {
    background: transparent;
    color: var(--c-blue);
    border-color: var(--c-border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.btn-ghost-dark:hover { background: var(--c-bg-soft); border-color: var(--c-blue); color: var(--c-blue); }
