/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text-primary: #E6E6E6;
    --text-secondary: #A7A7A7;
    --text-faint: #7A7A7A;
}

html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: "DM Mono", monospace;
    background-color: #0a0a0a;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 0 0;
    color: #E6E6E6;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Landing Container */
.landing-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    position: relative;
    justify-content: center;
    align-items: center;
}

/* Top Block - Static */
.top-block {
    position: absolute;
    top: 2rem;
    left: 2rem;
    text-align: left;
    padding: 0;
    margin: 0;
    margin-bottom: 64px;
}

.top-block > * {
    margin-left: 0;
    padding-left: 0;
}

.logo {
    height: 96px;
    width: auto;
    margin-bottom: 16px;
    margin-left: 0;
    margin-right: 0;
    display: block;
}

.brand-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.tagline {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 24px;
    margin-left: 0;
    margin-right: 0;
    line-height: 1.45;
    letter-spacing: 0.5px;
    max-width: 720px;
    padding-left: 0;
}

.description {
    display: none;
}

/* Center Block - Dynamic */
.center-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    padding: 0 2rem;
    position: relative;
    transform: translateY(-55px);
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.3s ease;
    z-index: 5;
    font-family: "DM Mono", monospace;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-block:hover .nav-arrow {
    opacity: 0.7;
}

.nav-arrow:hover {
    color: var(--text-primary);
}

.nav-arrow-left {
    left: -1rem;
}

.nav-arrow-right {
    right: -1rem;
}

.nav-arrow span {
    display: block;
    font-weight: 400;
    letter-spacing: 0;
}

/* Dynamic Text Container */
.dynamic-text-container {
    position: relative;
    width: 100%;
    min-height: 120px;
    text-align: center;
    margin-bottom: 40px;
}

.dynamic-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.dynamic-text.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.service-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 28px;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: 0.005em;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.service-description {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: #C6C6C6;
    max-width: 620px;
    margin: 0 auto;
    margin-bottom: 36px;
}

/* Word Navigation */
.word-navigation {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    margin-top: 40px;
}

.nav-word {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-faint);
    background: none;
    border: none;
    padding: 0;
    margin: 0 16px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    font-family: "DM Mono", monospace;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.nav-word::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.nav-word:hover {
    color: var(--text-secondary);
}

.nav-word.active {
    color: var(--text-primary);
}

.nav-word.active::after {
    width: 100%;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--text-faint);
    opacity: 0.5;
    animation: bounceDown 2s infinite;
    cursor: pointer;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-indicator svg {
    display: block;
    width: 24px;
    height: 24px;
}

@keyframes bounceDown {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* Footer */
.main-footer {
    width: 100%;
    padding: 120px 2rem 80px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background-color: #0a0a0a;
    position: relative;
    overflow: hidden;
}

.footer-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.footer-logo-svg {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
}

.footer-links {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    z-index: 10;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-faint);
    opacity: 0.6;
    transition: opacity 0.3s;
    font-family: "DM Mono", monospace;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-separator {
    color: var(--text-faint);
    opacity: 0.4;
    font-size: 13px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: #0f0f0f;
    padding: 3rem 2.5rem;
    border-radius: 0;
    width: 90%;
    max-width: 560px;
    text-align: left;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.8),
        8px 8px 0px rgba(0, 0, 0, 0.6);
    transform: translateY(-20px);
    opacity: 0;
    animation: slideIn 0.5s ease-out forwards;
}

.modal-content h2 {
    font-family: "DM Mono", monospace;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
    text-align: left;
    letter-spacing: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-content > p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-weight: 400;
}

.modal-content > p:last-child {
    margin-bottom: 0;
}

.modal-content a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s;
    border-bottom: 1px solid currentColor;
}

.modal-content a:hover {
    opacity: 0.7;
}

.impressum-content {
    text-align: left;
}

.impressum-content p {
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 400;
}

.impressum-content p:last-child {
    margin-bottom: 0;
}

.impressum-content p strong {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.impressum-content a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s;
    border-bottom: 1px solid currentColor;
}

.impressum-content a:hover {
    opacity: 0.7;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-faint);
    cursor: pointer;
    transition: color 0.3s, background 0.2s, border-color 0.2s;
    background: none;
    border: 2px solid transparent;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "DM Mono", monospace;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .top-block {
        top: 1.5rem;
        left: 1.5rem;
        padding: 0;
        margin: 0;
        margin-bottom: 64px;
    }
    
    .logo {
        height: 80px;
        margin-bottom: 14px;
    }
    
    .brand-name {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .tagline {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .description {
        display: none;
    }
    
    .center-block {
        padding: 0 1.5rem;
    }
    
    .dynamic-text-container {
        min-height: 140px;
        margin-bottom: 40px;
    }
    
    .service-title {
        font-size: 20px;
        margin-bottom: 28px;
        max-width: 620px;
    }
    
    .service-description {
        font-size: 15px;
        max-width: 620px;
        margin-bottom: 36px;
    }
    
    .word-navigation {
        gap: 0;
        margin-top: 40px;
    }
    
    .nav-word {
        font-size: 12px;
    }
    
    .nav-arrow {
        font-size: 20px;
        padding: 6px 10px;
    }
    
    .nav-arrow-left {
        left: -0.5rem;
    }
    
    .nav-arrow-right {
        right: -0.5rem;
    }
    
    .scroll-indicator {
        bottom: 30px;
    }
    
    .scroll-indicator svg {
        width: 20px;
        height: 20px;
    }
    
    .main-footer {
        padding: 80px 1.5rem 60px;
    }
    
    .footer-logo-svg {
        max-width: 100%;
    }
    
    .footer-links {
        bottom: 20px;
        right: 20px;
        font-size: 12px;
        gap: 10px;
    }
    
    .modal-content {
        padding: 2rem 1.75rem;
        max-width: 90%;
    }
    
    .modal-content h2 {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .modal-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 28px;
        height: 28px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-word {
        font-size: 14px;
        padding: 4px 0;
    }
    
    .word-navigation {
        gap: 20px;
    }
}

/* Content Sections */
.content-section {
    width: 100%;
    padding: 120px 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.section-container {
    max-width: 1200px;
    width: 100%;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 36px;
    line-height: 1.28;
    letter-spacing: -0.01em;
}

.section-intro {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: #C6C6C6;
    margin-bottom: 72px;
    letter-spacing: 0.002em;
}

/* What we do Section */
.what-we-do-section {
    padding-top: 140px;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.service-card {
    background: #0f0f0f;
    background-image: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.service-card:hover {
    background: #121212;
    background-image: none !important;
    border-top-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    line-height: 1;
    opacity: 0.7;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.32;
    letter-spacing: -0.008em;
    margin: 0;
}

.card-description {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.68;
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: 0.003em;
}

/* Systems Section */
.systems-section {
    padding-top: 120px;
    padding-bottom: 140px;
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.project-card {
    background: #0f0f0f;
    background-image: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
    background: #121212;
    background-image: none !important;
    border-top-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* Mobile Responsive for Content Sections */
@media (max-width: 767px) {
    .content-section {
        padding: 80px 1.5rem;
    }
    
    .what-we-do-section {
        padding-top: 100px;
    }
    
    .systems-section {
        padding-top: 80px;
        padding-bottom: 100px;
    }
    
    .section-title {
        font-size: 26px;
        margin-bottom: 28px;
    }
    
    .section-intro {
        font-size: 16px;
        margin-bottom: 56px;
        line-height: 1.65;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 28px 24px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .card-description {
        font-size: 14px;
        line-height: 1.65;
    }
    
    .project-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card {
        padding: 28px 24px;
    }
}
