/**
 * Precision Forge Theme
 * =====================
 * Immersive Factory Experience für HENX3D
 *
 * Features:
 * - Parallax Scrolling Effekte
 * - Funkenflug Partikel-Animation
 * - 3D-Tilt Effekte auf Cards
 * - Industrielle Metallic-Optik
 * - Warme Orange-Akzente (Glühendes Metall)
 *
 * @version 1.0.0
 * @created 2026-01-05
 */

/* ============================================
   ROOT VARIABLES - Precision Forge
   ============================================ */
:root {
    /* === FARBPALETTE === */
    /* Primärfarben - Industrielle Töne */
    --pf-primary-charcoal: #1a1d23;        /* Tiefer Stahl */
    --pf-primary-gunmetal: #2d3142;        /* Gunmetal Grau */
    --pf-primary-slate: #4f5d75;           /* Warmer Slate */

    /* Sekundärfarben - Metallische Akzente */
    --pf-secondary-silver: #bfc0c0;        /* Gebürstetes Silber */
    --pf-secondary-steel: #8b95a5;         /* Polierter Stahl */

    /* Akzentfarben - Glühendes Metall */
    --pf-accent-forge-red: #d94a2e;        /* Rotglut */
    --pf-accent-forge-orange: #ff6b35;     /* Orangeglut */
    --pf-accent-white-hot: #ffe5d9;        /* Weißglut */

    /* Neutrale Farben */
    --pf-white: #ffffff;
    --pf-black: #000000;
    --pf-concrete: #e8e9eb;                /* Betonboden */

    /* === TYPOGRAFIE === */
    --pf-font-heading: 'Rajdhani', 'Roboto', sans-serif;  /* Industrial Sans-Serif */
    --pf-font-body: 'Inter', 'Roboto', sans-serif;
    --pf-font-mono: 'JetBrains Mono', 'Consolas', monospace;

    /* Font Sizes */
    --pf-text-xs: 0.75rem;     /* 12px */
    --pf-text-sm: 0.875rem;    /* 14px */
    --pf-text-base: 1rem;      /* 16px */
    --pf-text-lg: 1.125rem;    /* 18px */
    --pf-text-xl: 1.25rem;     /* 20px */
    --pf-text-2xl: 1.5rem;     /* 24px */
    --pf-text-3xl: 1.875rem;   /* 30px */
    --pf-text-4xl: 2.25rem;    /* 36px */
    --pf-text-5xl: 3rem;       /* 48px */
    --pf-text-6xl: 3.75rem;    /* 60px */

    /* === SPACING === */
    --pf-space-xs: 0.5rem;     /* 8px */
    --pf-space-sm: 1rem;       /* 16px */
    --pf-space-md: 1.5rem;     /* 24px */
    --pf-space-lg: 2rem;       /* 32px */
    --pf-space-xl: 3rem;       /* 48px */
    --pf-space-2xl: 4rem;      /* 64px */
    --pf-space-3xl: 6rem;      /* 96px */

    /* === SHADOWS === */
    --pf-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --pf-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --pf-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
    --pf-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.3);

    /* Forge Glow Shadows */
    --pf-glow-red: 0 0 20px rgba(217, 74, 46, 0.5);
    --pf-glow-orange: 0 0 30px rgba(255, 107, 53, 0.6);
    --pf-glow-white: 0 0 40px rgba(255, 229, 217, 0.7);

    /* === BORDERS === */
    --pf-border-width: 1px;
    --pf-border-color: var(--pf-secondary-steel);
    --pf-border-radius: 4px;
    --pf-border-radius-lg: 8px;

    /* === GRADIENTS === */
    --pf-gradient-forge: linear-gradient(135deg,
        var(--pf-accent-forge-red) 0%,
        var(--pf-accent-forge-orange) 100%
    );

    --pf-gradient-metal: linear-gradient(135deg,
        var(--pf-primary-gunmetal) 0%,
        var(--pf-primary-slate) 100%
    );

    --pf-gradient-overlay: linear-gradient(180deg,
        rgba(26, 29, 35, 0.95) 0%,
        rgba(26, 29, 35, 0.7) 100%
    );

    /* === TRANSITIONS === */
    --pf-transition-fast: 150ms ease-in-out;
    --pf-transition-base: 250ms ease-in-out;
    --pf-transition-slow: 400ms ease-in-out;

    /* === Z-INDEX === */
    --pf-z-particles: 1;
    --pf-z-content: 10;
    --pf-z-header: 100;
    --pf-z-modal: 1000;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
body {
    font-family: var(--pf-font-body);
    font-size: var(--pf-text-base);
    line-height: 1.6;
    color: var(--pf-concrete);
    background: var(--pf-primary-charcoal);
    overflow-x: hidden;
}

/* Parallax Container */
.parallax-container {
    position: relative;
    overflow: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--pf-font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pf-white);
}

h1 {
    font-size: var(--pf-text-6xl);
    line-height: 1.1;
    margin-bottom: var(--pf-space-lg);
}

h2 {
    font-size: var(--pf-text-5xl);
    line-height: 1.2;
    margin-bottom: var(--pf-space-md);
}

h3 {
    font-size: var(--pf-text-4xl);
    line-height: 1.3;
    margin-bottom: var(--pf-space-md);
}

/* Forge Title - Glühend */
.forge-title {
    background: var(--pf-gradient-forge);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--pf-glow-orange);
    animation: forge-pulse 2s ease-in-out infinite;
}

@keyframes forge-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary,
.btn-forge {
    position: relative;
    padding: var(--pf-space-sm) var(--pf-space-lg);
    font-family: var(--pf-font-heading);
    font-size: var(--pf-text-lg);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pf-white);
    background: var(--pf-gradient-forge);
    border: none;
    border-radius: var(--pf-border-radius);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--pf-transition-base);
    box-shadow: var(--pf-shadow-md), var(--pf-glow-orange);
}

.btn-forge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left var(--pf-transition-slow);
}

.btn-forge:hover::before {
    left: 100%;
}

.btn-forge:hover {
    transform: translateY(-2px);
    box-shadow: var(--pf-shadow-lg), var(--pf-glow-white);
}

.btn-forge:active {
    transform: translateY(0);
}

/* Secondary Button - Metallisch */
.btn-secondary,
.btn-metal {
    padding: var(--pf-space-sm) var(--pf-space-lg);
    font-family: var(--pf-font-heading);
    font-size: var(--pf-text-lg);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pf-white);
    background: var(--pf-gradient-metal);
    border: 1px solid var(--pf-secondary-steel);
    border-radius: var(--pf-border-radius);
    cursor: pointer;
    transition: all var(--pf-transition-base);
    box-shadow: var(--pf-shadow-sm);
}

.btn-metal:hover {
    background: var(--pf-primary-slate);
    border-color: var(--pf-secondary-silver);
    box-shadow: var(--pf-shadow-md);
}

/* ============================================
   CARDS - 3D TILT EFFEKTE
   ============================================ */
.card,
.service-card,
.portfolio-card {
    position: relative;
    padding: var(--pf-space-lg);
    background: var(--pf-primary-gunmetal);
    border: 1px solid var(--pf-border-color);
    border-radius: var(--pf-border-radius-lg);
    box-shadow: var(--pf-shadow-md);
    transition: all var(--pf-transition-base);
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 3D Tilt Effect */
.card.tilt-active {
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(1.02);
    box-shadow: var(--pf-shadow-xl);
}

/* Metallic Shine Overlay */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: var(--pf-border-radius-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--pf-transition-base);
}

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

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: var(--pf-space-sm);
    margin-bottom: var(--pf-space-md);
    padding-bottom: var(--pf-space-sm);
    border-bottom: 2px solid var(--pf-accent-forge-orange);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pf-gradient-forge);
    border-radius: var(--pf-border-radius);
    box-shadow: var(--pf-glow-orange);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pf-primary-charcoal);
    overflow: hidden;
}

/* Parallax Background */
.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.hero-bg-layer-1 { z-index: 1; }
.hero-bg-layer-2 { z-index: 2; opacity: 0.7; }
.hero-bg-layer-3 { z-index: 3; opacity: 0.5; }

/* Gradient Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--pf-gradient-overlay);
    z-index: 5;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: var(--pf-z-content);
    text-align: center;
    max-width: 1200px;
    padding: var(--pf-space-2xl) var(--pf-space-lg);
}

.hero-tagline {
    font-size: var(--pf-text-xl);
    font-weight: 300;
    color: var(--pf-secondary-silver);
    margin-bottom: var(--pf-space-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-size: var(--pf-text-2xl);
    color: var(--pf-concrete);
    margin-bottom: var(--pf-space-xl);
    line-height: 1.4;
}

/* ============================================
   FUNKENFLUG PARTIKEL-ANIMATION
   ============================================ */
.spark-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--pf-z-particles);
    overflow: hidden;
}

.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--pf-accent-forge-orange);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--pf-accent-forge-orange),
                0 0 12px var(--pf-accent-forge-red);
    animation: spark-fall linear forwards;
    opacity: 0;
}

@keyframes spark-fall {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(50vh) translateX(var(--drift-x, 0)) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) translateX(var(--drift-x, 0)) scale(0.3);
    }
}

/* Größere Funken */
.spark.large {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 10px var(--pf-accent-forge-orange),
                0 0 20px var(--pf-accent-forge-red),
                0 0 30px var(--pf-accent-white-hot);
}

/* ============================================
   GRID LAYOUT - Factory Floor
   ============================================ */
.factory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--pf-space-lg);
    padding: var(--pf-space-2xl) var(--pf-space-lg);
}

/* ============================================
   NAVIGATION
   ============================================ */
header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 29, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pf-border-color);
    z-index: var(--pf-z-header);
    transition: all var(--pf-transition-base);
}

header.scrolled {
    background: rgba(26, 29, 35, 0.98);
    box-shadow: var(--pf-shadow-lg);
}

.nav-link {
    position: relative;
    padding: var(--pf-space-sm) var(--pf-space-md);
    color: var(--pf-concrete);
    text-decoration: none;
    font-family: var(--pf-font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--pf-transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--pf-gradient-forge);
    transform: translateX(-50%);
    transition: width var(--pf-transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--pf-accent-forge-orange);
}

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

/* ============================================
   SECTION DIVIDERS - Industrielle Trennlinien
   ============================================ */
.section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--pf-accent-forge-orange) 50%,
        transparent 100%
    );
    margin: var(--pf-space-3xl) 0;
    box-shadow: var(--pf-glow-orange);
}

/* ============================================
   FORMS
   ============================================ */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--pf-space-sm) var(--pf-space-md);
    font-family: var(--pf-font-body);
    font-size: var(--pf-text-base);
    color: var(--pf-white);
    background: var(--pf-primary-gunmetal);
    border: 1px solid var(--pf-border-color);
    border-radius: var(--pf-border-radius);
    transition: all var(--pf-transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--pf-accent-forge-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: var(--pf-text-4xl); }
    h2 { font-size: var(--pf-text-3xl); }
    h3 { font-size: var(--pf-text-2xl); }

    .hero-content {
        padding: var(--pf-space-xl) var(--pf-space-md);
    }

    .factory-grid {
        grid-template-columns: 1fr;
        gap: var(--pf-space-md);
        padding: var(--pf-space-xl) var(--pf-space-md);
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-forge {
    color: var(--pf-accent-forge-orange);
}

.bg-forge {
    background: var(--pf-gradient-forge);
}

.glow-forge {
    box-shadow: var(--pf-glow-orange);
}

/* Parallax Utility */
.parallax-slow { transform: translateY(calc(var(--scroll) * 0.5)); }
.parallax-medium { transform: translateY(calc(var(--scroll) * 0.3)); }
.parallax-fast { transform: translateY(calc(var(--scroll) * 0.1)); }
