/* ============================================
   OEZ.AI — Design System 2026
   Hybrid Theme (Auto + Manual Toggle)
   ============================================ */

/* --- Font Faces (lokal gehostet, DSGVO-konform) --- */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/Inter-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('/static/fonts/SpaceGrotesk-Variable.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

/* --- CSS Custom Properties --- */
:root {
    --primary: #6C63FF;
    --primary-light: #8B83FF;
    --primary-dark: #4F46E5;
    --accent: #00D4AA;
    --accent-light: #00E4BA;
    --accent-dark: #00B894;
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-hover: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    scroll-behavior: smooth;
}

/* --- Grain Texture Overlay --- */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* --- Custom Cursor --- */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, opacity 0.15s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.custom-cursor.hovering {
    width: 50px;
    height: 50px;
    border-color: var(--accent);
    opacity: 0.6;
}

/* --- Navigation Glass Effect --- */
.nav-glass {
    background: rgba(250, 250, 250, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}
.dark .nav-glass {
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #6b7280;
    position: relative;
}
.dark .nav-link { color: #9ca3af; }
.nav-link:hover, .nav-link.active {
    color: #1a1a2e;
    background: rgba(108, 99, 255, 0.08);
}
.dark .nav-link:hover, .dark .nav-link.active {
    color: #f5f5f5;
    background: rgba(108, 99, 255, 0.15);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
}

.nav-dropdown {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
.dark .nav-dropdown {
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    transition: all 0.2s ease;
}
.dark .dropdown-link { color: #9ca3af; }
.dropdown-link:hover {
    color: var(--primary);
    background: rgba(108, 99, 255, 0.06);
    padding-left: 1.25rem;
}

/* --- Mobile Menu --- */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}
.hamburger span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-link {
    color: #374151;
    transition: all 0.3s ease;
    position: relative;
}
.dark .mobile-nav-link { color: #d1d5db; }
.mobile-nav-link:hover {
    color: var(--primary);
    transform: translateX(8px);
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(108, 99, 255, 0.35);
}
.btn-primary span { position: relative; z-index: 1; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(108, 99, 255, 0.25);
}

/* --- Glass Card --- */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 640px) {
    .glass-card { padding: 1.75rem; border-radius: 1.25rem; }
}
.dark .glass-card {
    background: rgba(17, 17, 17, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(108, 99, 255, 0.12);
    border-color: rgba(108, 99, 255, 0.3);
}
.dark .glass-card:hover {
    box-shadow: 0 25px 60px rgba(108, 99, 255, 0.15);
}

/* --- Hero Section --- */
.hero-gradient {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(108, 99, 255, 0.08) 0%, transparent 50%);
}
.dark .hero-gradient {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 170, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(108, 99, 255, 0.1) 0%, transparent 50%);
}

/* Animated gradient orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}
.gradient-orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}
.gradient-orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    right: 10%;
    animation-delay: -3s;
}
.gradient-orb-3 {
    width: 250px;
    height: 250px;
    background: var(--primary-light);
    bottom: 10%;
    left: 30%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Text gradient */
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow effect on buttons */
.glow-hover {
    position: relative;
}
.glow-hover::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.3s ease;
}
.glow-hover:hover::after { opacity: 0.5; }

/* Scroll indicator */
.scroll-indicator {
    animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

/* --- Stats Counter --- */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Social Icon Links --- */
.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    transition: all 0.3s ease;
}
.social-icon-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.3);
}

/* --- Contact Form --- */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-top: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #1a1a2e;
    transition: all 0.3s ease;
    outline: none;
}
.dark .form-input {
    background: rgba(17, 17, 17, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}
.form-label {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.2s ease;
}
textarea ~ .form-label {
    top: 1.5rem;
    transform: none;
}
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: 0.5rem;
    transform: none;
    font-size: 0.75rem;
    color: var(--primary);
}
textarea.form-input:focus ~ .form-label,
textarea.form-input:not(:placeholder-shown) ~ .form-label {
    top: 0.35rem;
    font-size: 0.75rem;
    color: var(--primary);
}

.form-input.error {
    border-color: #ef4444;
    animation: shake 0.5s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-4px); }
}

/* Checkbox */
.checkbox-custom {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}
.checkbox-custom input[type="checkbox"] {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    margin-top: 0.125rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}
.dark .checkbox-custom input[type="checkbox"] {
    border-color: rgba(255, 255, 255, 0.15);
}
.checkbox-custom input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
.checkbox-custom input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    max-width: 480px;
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark .cookie-banner {
    background: rgba(17, 17, 17, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}
.cookie-banner.visible {
    transform: translateY(0);
}

/* --- Section Styles --- */
.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

/* Animated underline */
.animated-underline {
    position: relative;
    display: inline-block;
}
.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
    transition: width 0.4s ease;
}
.animated-underline:hover::after { width: 100%; }

/* --- Feature Card (Service Pages) --- */
.feature-card {
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.feature-card:hover::before { transform: scaleX(1); }

/* --- Page Transition --- */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}
.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Loading Spinner --- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Confetti (for form success) --- */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    z-index: 100;
    pointer-events: none;
    animation: confetti-fall 2.5s ease-out forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* --- RTL Support --- */
[dir="rtl"] .nav-link { direction: rtl; }
[dir="rtl"] .dropdown-link { flex-direction: row-reverse; }
[dir="rtl"] .mobile-nav-link:hover { transform: translateX(-8px); }
[dir="rtl"] .form-label { left: auto; right: 1.25rem; }

/* ============================================
   RESPONSIVE — Mobile First
   ============================================ */

/* --- Tablet (max-width: 768px) --- */
@media (max-width: 768px) {
    .stat-number { font-size: 2rem; }
    .gradient-orb { opacity: 0.15; }
    .gradient-orb-1 { width: 200px; height: 200px; }
    .gradient-orb-2 { width: 150px; height: 150px; }
    .gradient-orb-3 { width: 120px; height: 120px; }

    .nav-glass {
        margin: 0.5rem;
        border-radius: 1rem;
        padding: 0.75rem 1rem;
    }

    .section-heading {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    .cookie-banner {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        max-width: none;
        padding: 1.25rem;
        border-radius: 1rem;
    }

    /* Touch-friendly targets */
    .nav-link,
    .dropdown-link,
    .btn-primary,
    .btn-outline {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .social-icon-link {
        width: 2.75rem;
        height: 2.75rem;
    }

    /* Form adjustments */
    .form-input {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* --- Small Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    .stat-number { font-size: 1.75rem; }

    .glass-card {
        padding: 1rem;
    }

    .nav-glass {
        margin: 0.25rem;
        padding: 0.625rem 0.75rem;
    }

    .section-heading {
        font-size: 1.5rem;
    }

    .cookie-banner {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        padding: 1rem;
    }

    /* Disable heavy effects */
    .gradient-orb { opacity: 0.1; }
    .grain-overlay { display: none; }

    .mobile-nav-link {
        font-size: 1.375rem;
        padding: 0.5rem 0;
    }

    .form-label {
        font-size: 0.875rem;
    }
}

/* --- Touch device: no hover-only effects --- */
@media (hover: none) {
    .custom-cursor { display: none !important; }
    .glass-card:hover { transform: none; }
    .btn-primary:hover { transform: none; }
    .btn-outline:hover { transform: none; }
    .social-icon-link:hover { transform: none; }
    .nav-link::after { display: none; }
    .pulse-cta { animation: none; }
}

/* --- Selection Color --- */
::selection {
    background: rgba(108, 99, 255, 0.3);
    color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(108, 99, 255, 0.5); }

/* --- Pulse CTA --- */
.pulse-cta {
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(108, 99, 255, 0); }
}
