@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   CSS Variables & Tokens 
   ========================================================================== */
:root {
    --primary-color: #DBA827;
    /* Apple-like Yellow */
    --primary-hover: #c49622;
    /* Darker Yellow */
    --accent-color: #fceea7;
    /* Light Yellow */

    --bg-main: #f5f5f7;
    /* Apple gray background */
    --bg-secondary: #ffffff;
    --bg-dark: #1d1d1f;
    /* Apple dark gray */
    --bg-glass: rgba(255, 255, 255, 0.85);

    --text-primary: #1d1d1f;
    /* Apple dark text */
    --text-secondary: #86868b;
    /* Apple gray text */
    --text-light: #f5f5f7;

    --border-color: #d2d2d7;
    --border-radius: 18px;
    /* Rounder like Apple */
    --border-radius-sm: 8px;

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(219, 168, 39, 0.3);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-main: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-main: #000000;
    --bg-secondary: #1d1d1f;
    --bg-dark: #f5f5f7;
    --bg-glass: rgba(29, 29, 31, 0.85);

    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-light: #1d1d1f;

    --border-color: #424245;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Offset for sticky header */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--bg-dark);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ===============================
   Compact Impressum Grid
   =============================== */
.impressum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.impressum-box {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-top: 3px solid var(--primary-color);
}

.impressum-box h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.impressum-box p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.impressum-box strong {
    color: var(--text-primary);
}

.mt-1 {
    margin-top: 1.5rem;
}

.bg-light {
    background-color: var(--bg-secondary);
}

.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bg-dark);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    gap: 2.5rem;
}

nav ul li a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: var(--bg-main);
    /* Modern Background Effect */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(219, 168, 39, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(219, 168, 39, 0.05) 0%, transparent 50%);
    overflow: hidden;
}

/* Hero Background Grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    animation: fadeUp 1s ease forwards;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-btn {
    animation: fadeUp 1s ease 0.4s forwards;
    opacity: 0;
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Companies Grid
   ========================================================================== */
.companies-section {
    background-color: var(--bg-main);
}

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

.company-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}

.company-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.company-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.company-card:hover .card-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.company-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.company-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-link {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-card:hover .card-link {
    color: var(--primary-hover);
}

.card-link i {
    transition: transform 0.3s ease;
}

.company-card:hover .card-link i {
    transform: translateX(5px);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    background-color: var(--bg-main);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.captcha-group {
    background: rgba(37, 99, 235, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    border: 1px dashed var(--primary-color);
}

.captcha-group label span {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
}

.error-msg {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.success-msg {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    margin-top: 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.error-msg-box {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    margin-top: 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

/* ==========================================================================
   Impressum
   ========================================================================== */
.impressum-content {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.impressum-block h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.impressum-block p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--bg-main);
    color: var(--text-secondary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-nav {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-primary);
    font-size: 0.95rem;
}

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

.footer-nav .separator {
    color: var(--text-secondary);
}

/* ==========================================================================
   Subpages
   ========================================================================== */
.subpage-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.page-content {
    padding-top: 80px;
}

.back-link {
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.back-link i {
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-5px);
}

/* ==========================================================================
   Floating Options (Cookie & WhatsApp)
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ==========================================================================
   Theme Toggle
   ========================================================================== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1001;
    /* Above header */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.cookie-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-buttons .btn-secondary {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.cookie-buttons .btn-secondary:hover {
    background: var(--bg-secondary);
}

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20b055;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
}

/* ==========================================================================
   Hub Typography & Layout
   ========================================================================== */
.hub-title {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hub-title span {
    color: var(--primary-color);
}

.hub-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-weight: 400;
    letter-spacing: -0.2px;
}

.grid-centered {
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Responsive Mobile Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .impressum-grid {
        grid-template-columns: 1fr;
    }

    .hub-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }

    .header-container {
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
        height: auto;
        padding: 1rem 0;
    }

    nav ul {
        gap: 1.5rem;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .section-padding {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.8rem;
        word-break: break-word;
        hyphens: auto;
    }

    .cookie-banner {
        flex-direction: column;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        text-align: center;
    }

    .container {
        padding: 0 1rem;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .contact-wrapper,
    .impressum-content {
        padding: 2rem 1rem;
    }

    .whatsapp-float {
        bottom: 5.5rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}