/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-accent: #2a2a2a;
    --color-hover: #4a4a4a;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300; /* Inter Light */
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo-wrapper {
    position: relative;
}

.logo {
    font-family: 'Inter', sans-serif;
    font-weight: 900; /* Inter Black */
    font-size: 3rem;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.7;
}

/* Navigation Items */
.nav-items {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-item {
    position: relative;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* Inter Medium */
    font-size: 2rem;
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-hover);
}

/* Dropdowns */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: transparent;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: var(--spacing-sm) 0;
    margin-top: 0;
}

.logo-wrapper:hover .dropdown,
.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* Inter Medium */
    font-size: 2rem;
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.2s ease;
}

.dropdown a:hover {
    color: var(--color-hover);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: var(--spacing-sm);
}

.lang-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* Inter Medium */
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.3s ease;
    opacity: 0.5;
}

.lang-btn.active {
    opacity: 1;
    text-decoration: underline;
}

.lang-btn:hover {
    opacity: 1;
}

.lang-separator {
    color: var(--color-text);
    opacity: 0.3;
}

/* Main Content */
main {
    margin-top: 80px;
}

.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: 50vh;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    text-align: center;
    padding: 0 var(--spacing-md);
}

.hero-content {
    width: 100%;
    max-width: 1200px;
}

.hero-content h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 300; /* Inter Light */
    font-size: clamp(3.5rem, 8vw, 7rem);
    margin-bottom: 14rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.typing-cursor {
    display: inline-block;
    width: 0.5rem;
    height: 1em;
    background-color: var(--color-text);
    margin-left: 0.2rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.8;
}

/* Section Headings */
h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* Inter Medium */
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.01em;
}

h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* Inter Medium */
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: var(--spacing-sm);
}

/* Projects Section */
.project-subsection {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.project-subsection h3 {
    margin-bottom: var(--spacing-md);
}

.project-placeholder {
    opacity: 0.5;
    font-style: italic;
}

/* Project Cards */
.project-card {
    max-width: 800px;
    margin: var(--spacing-md) 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.project-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.project-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover .project-thumbnail {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: white;
    padding: var(--spacing-lg);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.project-meta {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-item {
    padding: var(--spacing-md);
    border-left: 3px solid var(--color-accent);
    transition: padding-left 0.3s ease;
}

.service-item:hover {
    padding-left: calc(var(--spacing-md) + 0.5rem);
}

/* Content Text */
.content-text {
    max-width: 900px;
    line-height: 1.8;
}

.content-text p {
    margin-bottom: var(--spacing-md);
}

/* Team Section */
.team-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 1000px;
}

.team-image-wrapper {
    position: relative;
    width: 100%;
}

.team-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.team-names {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-lg);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 8px;
    pointer-events: none;
}

.team-image-wrapper:hover .team-names {
    opacity: 1;
}

.team-name {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    position: absolute;
    bottom: var(--spacing-lg);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.team-image-wrapper:hover .team-name-1 {
    animation-delay: 0.1s;
}

.team-image-wrapper:hover .team-name-2 {
    animation-delay: 0.2s;
}

.team-image-wrapper:hover .team-name-3 {
    animation-delay: 0.3s;
}

.team-image-wrapper:hover .team-name-4 {
    animation-delay: 0.4s;
}

/* Position names - on one line centered */
.team-name-1 {
    left: 25%;
    transform: translateX(-50%);
    bottom: 50%;
}

.team-name-2 {
    left: 50%;
    transform: translateX(-50%);
    bottom: 50%;
}

.team-name-3 {
    left: 75%;
    transform: translateX(-50%);
    bottom: 50%;
}

.team-name-4 {
    left: 15%;
    transform: translateX(-50%);
    bottom: 15%;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Contact Info */
.contact-info {
    max-width: 600px;
    line-height: 2;
}

.contact-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 900; /* Inter Black */
}

.contact-info a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--color-hover);
}

/* Impressum */
.impressum-content {
    max-width: 800px;
    line-height: 1.8;
}

.impressum-content p {
    margin-bottom: var(--spacing-md);
}

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

/* Footer */
footer {
    background-color: #000000;
    padding: var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-xl);
}

.footer-content p {
    font-size: 0.9rem;
    color: #ffffff;
}

/* Project Gallery Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow-y: auto;
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 1200px;
    width: 90%;
    margin: var(--spacing-lg);
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
    padding: 0;
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    display: block;
}

.gallery-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-prev {
    left: 0;
}

.gallery-next {
    right: 0;
}

.modal-info {
    color: white;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.modal-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-info p {
    opacity: 0.8;
}

.gallery-thumbnails {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
}

.gallery-thumbnails img:hover,
.gallery-thumbnails img.active {
    opacity: 1;
    border-color: white;
}

/* Mobile Responsive - iPhone and smaller devices */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }

    .logo {
        font-size: 2rem;
    }

    .nav-items {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .dropdown a {
        font-size: 1.5rem;
    }

    /* Hide language switcher on scroll for more screen space */
    .main-nav.scrolled .language-switcher {
        display: none;
    }

    .dropdown {
        position: fixed;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 250px;
    }

    .logo-wrapper:hover .dropdown,
    .nav-item:hover .dropdown {
        transform: translateX(-50%) translateY(0);
    }

    .section {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    main {
        margin-top: 200px;
    }
}

/* iPhone specific optimizations */
@media (max-width: 430px) {
    .hero-section {
        min-height: 70vh;
        padding: var(--spacing-md);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .dropdown a {
        font-size: 1.2rem;
    }

    .nav-items {
        gap: 0.5rem;
    }

    .language-switcher {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: var(--spacing-xs);
    }

    .project-category,
    .service-item {
        padding: var(--spacing-sm);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Accessibility - Focus States */
a:focus,
button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .main-nav,
    .language-switcher {
        display: none;
    }

    main {
        margin-top: 0;
    }
}
