/* ===========================
   Real-Soft Informatik GmbH
   Full-page sections layout
   =========================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1a365d;
    --color-primary-light: #2b5797;
    --color-accent: #3b82f6;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 960px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
    scroll-snap-type: y proximity;
}

body {
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

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

/* ==============================
   Full-page sections
   ============================== */

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
}

.page-alt {
    background: var(--color-bg-alt);
}

.page-content {
    width: 100%;
    padding: 80px 0;
}

.page-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 36px;
    letter-spacing: -0.3px;
}

/* ==============================
   Header (hidden on hero, appears after scroll)
   ============================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    height: 56px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.header.visible {
    transform: translateY(0);
    opacity: 1;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav a {
    font-size: 12px;
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
    letter-spacing: 0.01em;
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Language selector */
.lang-selector {
    position: relative;
    margin-left: 8px;
}

.lang-current {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    font-family: var(--font);
    transition: border-color 0.2s;
}

.lang-current:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all 0.15s;
    min-width: 100px;
    z-index: 200;
}

.lang-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-menu button {
    display: block;
    width: 100%;
    padding: 6px 12px;
    border: none;
    background: none;
    text-align: left;
    font-size: 12px;
    font-family: var(--font);
    color: var(--color-text-light);
    cursor: pointer;
    transition: background 0.15s;
}

.lang-menu button:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.lang-menu button:first-child { border-radius: 6px 6px 0 0; }
.lang-menu button:last-child { border-radius: 0 0 6px 6px; }

/* Mobile nav */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--color-text);
    transition: all 0.2s;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(3px, 3px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(3px, -3px); }

/* ==============================
   Hero Page
   ============================== */

.hero-page {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    flex-direction: column;
}

.hero-center {
    text-align: center;
}

.hero-logo {
    width: 180px;
    height: auto;
    margin-bottom: 32px;
}

.hero-page h1 {
    font-size: 36px;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.hero-sub {
    font-size: 14px;
    color: var(--color-text-light);
    max-width: 480px;
    margin: 0 auto 32px;
}

.btn {
    display: inline-block;
    padding: 10px 28px;
    background: var(--color-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s;
    letter-spacing: 0.01em;
}

.btn:hover {
    background: var(--color-primary-light);
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-hint span {
    display: block;
    width: 20px;
    height: 32px;
    border: 1.5px solid var(--color-text-light);
    border-radius: 10px;
    position: relative;
}

.scroll-hint span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: var(--color-text-light);
    border-radius: 2px;
    animation: scrollPulse 1.8s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; top: 6px; }
    50% { opacity: 0.3; top: 14px; }
}

/* ==============================
   Two Column
   ============================== */

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.two-col p {
    color: var(--color-text-light);
    margin-bottom: 12px;
}

/* ==============================
   Timeline
   ============================== */

.timeline {
    position: relative;
    padding-left: 32px;
    max-width: 680px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid var(--color-bg-alt);
}

.timeline-year {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.timeline-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.timeline-content p {
    color: var(--color-text-light);
    font-size: 13px;
}

.timeline-photo {
    margin-top: 12px;
}

.timeline-photo img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    display: block;
}

.timeline-photo-caption {
    display: block;
    font-size: 11px;
    color: var(--color-text-light);
    margin-top: 6px;
    font-style: italic;
}

/* ==============================
   Product
   ============================== */

.product-card {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 24px;
    background: var(--color-bg);
}

.product-badge {
    position: absolute;
    top: -10px;
    right: 24px;
    background: var(--color-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 4px;
}

.product-logo {
    display: block;
    height: 160px;
    width: auto;
    margin-bottom: 4px;
    margin-left: -42px;
    filter: hue-rotate(-55deg) saturate(1.3) brightness(0.85);
    object-fit: cover;
    object-position: center;
    clip-path: inset(15% 12% 12% 12%);
}

.product-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.product-tagline {
    font-size: 12px;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 16px;
}

.product-info > p {
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.product-features {
    list-style: none;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
}

.product-features li {
    font-size: 12px;
    color: var(--color-text-light);
    padding-left: 16px;
    position: relative;
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
}

.legacy-note {
    padding: 24px;
    border-left: 2px solid var(--color-border);
}

.legacy-note h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.legacy-note p {
    color: var(--color-text-light);
    font-size: 12px;
}

/* ==============================
   Memorial
   ============================== */

.memorial {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    align-items: start;
}

.memorial-photo img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
    filter: grayscale(15%);
}

.memorial-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 2px;
}

.memorial-role {
    font-size: 12px;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 16px;
}

.memorial-text p {
    color: var(--color-text-light);
    margin-bottom: 10px;
}

/* ==============================
   Contact + Impressum
   ============================== */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 0;
}

.contact-item h3 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: 6px;
}

.contact-item p {
    font-size: 13px;
    color: var(--color-text-light);
}

.contact-item a {
    color: var(--color-accent);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Impressum link on contact page */
.impressum-link-box {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.impressum-link-box {
    display: flex;
    gap: 24px;
}

.impressum-link-box a {
    font-size: 13px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

.impressum-link-box a:hover {
    text-decoration: underline;
}

/* Impressum standalone page */
.impressum-page {
    padding: 96px 0 60px;
}

.impressum-back {
    display: inline-block;
    font-size: 12px;
    color: var(--color-accent);
    text-decoration: none;
    margin-bottom: 24px;
}

.impressum-back:hover {
    text-decoration: underline;
}

.impressum-page-heading {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 32px;
    letter-spacing: -0.3px;
}

.impressum-page-content {
    max-width: 680px;
}

.legal-section {
    break-inside: avoid;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.legal-section p {
    font-size: 11px;
    color: var(--color-text-light);
    margin-bottom: 4px;
    line-height: 1.6;
}

.legal-section a {
    color: var(--color-accent);
    text-decoration: none;
    word-break: break-all;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* ==============================
   Footer
   ============================== */

.footer {
    border-top: 1px solid var(--color-border);
    padding: 20px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--color-text-light);
}

.footer-logo {
    height: 24px;
    width: auto;
}

.footer-right {
    display: flex;
    gap: 16px;
}

.footer-right a {
    font-size: 12px;
    color: var(--color-text-light);
    text-decoration: none;
}

.footer-right a:hover {
    color: var(--color-primary);
}

/* ==============================
   Responsive
   ============================== */

@media (max-width: 768px) {
    /* Disable scroll snap on mobile — sections are too tall */
    html {
        scroll-snap-type: none;
    }

    /* Pages don't need full viewport on mobile */
    .page {
        min-height: auto;
        scroll-snap-align: none;
    }

    /* Keep hero full height */
    .hero-page {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        flex-direction: column;
        padding: 16px 24px;
        gap: 12px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.2s;
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: flex;
    }

    .lang-selector {
        margin-left: 0;
    }

    .hero-logo {
        width: 140px;
    }

    .hero-page h1 {
        font-size: 26px;
    }

    .hero-sub {
        font-size: 13px;
        padding: 0 16px;
    }

    .page-content {
        padding: 48px 0;
    }

    .page-content h2 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Timeline */
    .timeline {
        max-width: 100%;
    }

    .timeline-photo img {
        max-width: 100%;
    }

    /* Products */
    .product-card {
        padding: 24px 20px;
    }

    .product-features {
        grid-template-columns: 1fr;
    }

    /* Memorial */
    .memorial {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .memorial-photo img {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .impressum-content {
        columns: 1;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-logo {
        width: 120px;
    }

    .hero-page h1 {
        font-size: 22px;
    }

    .page-content {
        padding: 40px 0;
    }

    .page-content h2 {
        font-size: 18px;
    }

    /* Timeline compact */
    .timeline {
        padding-left: 24px;
    }

    .timeline-item {
        margin-bottom: 24px;
    }

    .timeline-item::before {
        left: -21px;
        width: 7px;
        height: 7px;
    }

    .timeline-content h3 {
        font-size: 13px;
    }

    .timeline-content p {
        font-size: 12px;
    }

    /* Products */
    .product-card {
        padding: 20px 16px;
    }

    .product-info h3 {
        font-size: 16px;
    }

    .legacy-note {
        padding: 16px;
    }

    /* Memorial */
    .memorial-photo img {
        width: 160px;
        height: 160px;
    }

    .memorial-text h3 {
        font-size: 15px;
    }

    /* Contact single column */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .impressum-heading {
        font-size: 16px;
    }
}
