:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #ea580c; /* Orange */
    --secondary-text: #a1a1aa;
    --card-bg: #0a0a0a;
    --font-sans: 'Khand', sans-serif;
    --font-display: 'Oswald', sans-serif;
    --container-width: 1200px;
    --spacing-section: 10rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4; /* Adjusted for Khand */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1.1rem; /* Slightly larger for Khand */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.logo-container:hover .logo-icon {
    transform: scale(1.05);
}

.logo-icon {
    transition: transform 0.3s ease;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
}

.footer-logo-main {
    font-size: 1.1rem;
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary-text);
    text-align: left;
    width: auto;
    line-height: 1.2;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-text);
}

.lang-switcher a {
    color: var(--secondary-text);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.lang-switcher a:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.lang-switcher a.active {
    opacity: 1;
}

.lang-switcher img {
    width: 22px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-text);
    position: relative;
}

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

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

.nav-link:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--text-color);
    color: var(--bg-color);
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    background: var(--accent-color);
    color: var(--text-color);
}

.cta-button::after {
    display: none;
}

/* Hero */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 4rem;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(3.5rem, 9vw, 7rem);
    margin-bottom: 2rem;
    background: linear-gradient(to bottom right, #fff, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--secondary-text);
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--text-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    background: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
}

.btn-secondary:hover {
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

/* SEO Hero */
.seo-hero-root {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 4rem;
}

.seo-sun-orb {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
}

.fox-container {
    position: relative;
    width: 300px;
    height: 300px;
    z-index: 1;
    opacity: 0.9;
    pointer-events: none;
    margin-bottom: 1rem;
    top: auto;
    left: auto;
    transform: none;
}

.seo-shards-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.seo-shard {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.seo-hero-content {
    position: relative;
    z-index: 20;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.seo-hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: var(--text-color);
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.seo-hero-desc {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    margin-bottom: 3rem;
    color: var(--secondary-text);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 300;
}

.seo-hero-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--accent-color);
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(234, 88, 12, 0.2);
    text-transform: uppercase;
    margin-bottom: 4rem;
}

.seo-hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(234, 88, 12, 0.4);
    background: #c2410c;
}

/* Sections */
.section {
    padding: var(--spacing-section) 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.service-card p {
    color: var(--secondary-text);
    font-size: 1.05rem;
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 2rem;
    color: var(--secondary-text);
    font-size: 1.15rem;
    font-weight: 300;
}

.about-text strong {
    color: var(--text-color);
    font-weight: 600;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.stat-item {
    text-align: left;
    padding: 0;
    background: transparent;
    border: none;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    color: var(--secondary-text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 6rem;
    background: transparent;
    padding: 0;
    border: none;
}

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

.contact-info p {
    margin-bottom: 1.5rem;
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-links a {
    color: #ffffff;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

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

/* Page Content (Impressum/Datenschutz) */
.page-content {
    padding-top: 10rem;
    padding-bottom: 6rem;
    max-width: 800px;
}

.page-content h1 {
    font-size: 3.5rem;
    margin-bottom: 3rem;
}

.page-content h2 {
    font-size: 1.75rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
}

.page-content p {
    margin-bottom: 1.5rem;
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.page-content a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

.page-content a:hover {
    text-decoration-color: var(--accent-color);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Chart Tooltip */
.chart-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    align-items: stretch; /* Ensure cards stretch to same height */
}

.chart-card {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 100%; /* Ensure cards have same height */
    display: flex;
    flex-direction: column;
}

.chart-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.1);
}

.chart-card h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4rem;
}

.chart-container, .bar-chart-container {
    width: 100%;
    position: relative;
    margin-top: auto; /* Push to bottom if needed */
    display: flex;
    flex-direction: column;
}

.line-chart-svg {
    overflow: visible;
    width: 100%;
    height: 250px;
}

.bar-graph-area {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    width: 100%;
    height: 250px;
    border-bottom: 1px solid #333;
    padding-bottom: 0;
}

.chart-line-path {
    filter: drop-shadow(0 0 8px rgba(234, 88, 12, 0.5));
}

.chart-point {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.bar {
    position: relative;
    width: 100%;
    bottom: 0;
    /* transition: height 1.5s ease-out; Removed to prevent conflict with GSAP */
}

.bar-group:hover .bar {
    filter: brightness(1.2);
}

/* Responsive */
@media (max-width: 900px) {
    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title,
    .seo-hero-title {
        font-size: 2.5rem; /* Reduced font size */
    }

    .charts-grid,
    .services-grid,
    .linkbuilding-grid {
        grid-template-columns: 1fr !important; /* Stack charts and services on mobile */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px; /* 20px spacing on sides */
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .header-inner {
        flex-direction: row; /* Keep logo and hamburger in row */
        justify-content: space-between;
        align-items: center;
        padding: 0 20px; /* Ensure header content aligns with container */
    }
    
    .mobile-menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%; /* Full width for better control */
        max-width: 300px; /* Limit width */
        height: 100vh;
        background: #000000; /* Pure black background */
        flex-direction: column;
        justify-content: flex-start; /* Align items to top */
        align-items: flex-start; /* Align items to left */
        transition: right 0.3s ease;
        z-index: 100;
        padding: 6rem 0 0 20px; /* Top padding + 20px left spacing */
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        gap: 30px; /* 30px between items */
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-family: 'Oswald', sans-serif; /* Oswald font */
        font-size: 1.5rem;
        text-transform: uppercase; /* Capitalized */
        color: #ffffff !important; /* Pure white text */
        margin-bottom: 0; /* Use gap instead */
        width: 100%;
        text-align: left;
    }

    .cta-button {
        margin-left: 0;
        margin-top: 1rem;
    }

    /* Hero Mobile Optimization */
    .logo-main {
        font-size: 1.2rem;
    }
    
    .footer-logo-main {
        font-size: 1.2rem;
    }

    .logo-tagline {
        font-size: 0.6rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .hero-title,
    .seo-hero-title {
        font-size: 2rem; /* Smaller heading for mobile */
        word-wrap: break-word; /* Prevent overflow */
        margin-bottom: 1rem;
    }
    
    .seo-hero-desc {
        font-size: 1rem; /* Smaller intro text */
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Section Headings Mobile */
    .section-title {
        font-size: 2rem; /* Smaller section titles */
        margin-bottom: 2rem;
        text-align: center; /* Default center */
    }

    /* "Das Problem" Section - Heading Centered, Text Left */
    .about-text h2 {
        text-align: center !important;
    }

    .about-text p {
        text-align: left !important; /* Force left alignment for paragraphs */
    }

    /* "Über SEO Partner Schweiz" Section - Consistent Style */
    #about .section-title {
        text-align: center !important;
    }
    
    #about .about-text p {
        text-align: left !important;
    }

    /* Service Cards Alignment */
    .service-card h3 {
        text-align: center;
    }
    
    .service-card p {
        text-align: left;
    }

    /* Stats Mobile Optimization */
    .stat-number {
        font-size: 2.5rem; /* Smaller digits */
    }
    
    .about-stats {
        gap: 2rem;
    }

    /* General Content Alignment */
    .seo-hero-content, .contact-info {
        text-align: center;
        padding: 0; /* Remove extra padding to respect container */
    }
    
    /* Fox visibility */
    .fox-container {
        width: 100%;
        max-width: 200px; /* Smaller fox on mobile */
        height: 200px;
        margin: 0 auto 1rem auto;
        display: block; /* Ensure visibility */
        opacity: 1;
    }
    
    /* Ensure charts don't overflow */
    .chart-container, .bar-chart-container {
        width: 100%;
        overflow: hidden; /* Clip overflow */
    }

    .chart-card {
        padding: 1.5rem; /* Reduce padding on mobile */
    }
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
    font-family: var(--font-display);
}

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

.cookie-options {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.cookie-option:last-child {
    margin-bottom: 0;
}

.cookie-option input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--accent-color);
}

.cookie-option span {
    font-size: 0.9rem;
    color: var(--secondary-text);
    line-height: 1.4;
}

.cookie-option strong {
    color: #fff;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.cookie-buttons .btn-primary {
    background: var(--accent-color);
    color: #fff;
    border: none;
    flex: 1;
    min-width: 200px;
}

.cookie-buttons .btn-primary:hover {
    background: #c2410c;
}

.cookie-buttons .btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    min-width: 200px;
}

.cookie-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cookie-buttons .btn-text {
    background: transparent;
    color: var(--secondary-text);
    border: none;
    padding: 0.75rem 0;
    text-decoration: underline;
}

.cookie-buttons .btn-text:hover {
    color: #fff;
}

.cookie-links {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    justify-content: center;
}

.cookie-links a {
    color: var(--secondary-text);
    text-decoration: underline;
}

.cookie-links a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 12px 12px 0 0;
        border-bottom: none;
        border-left: none;
        border-right: none;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons button {
        width: 100%;
    }
}
