/* ==========================================================================
   foesi-it.at — Premium Tech Theme (im Stil der Vorlage, IT/EDV statt Forst)
   ========================================================================== */
:root {
    --noir: #070b16;
    --noir-panel: #0d1830;
    --circuit-slate: #33415c;
    --mist: #c7d2e0;
    --accent-blue: #3b82f6;
    --accent-blue-bright: #60a5fa;
    --bg-overlay: rgba(4, 8, 18, 0.62);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snappy: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { font-family: inherit; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    line-height: 1.6;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
    text-transform: none;
}

.mobile-link { font-family: 'Outfit', sans-serif !important; }

.text-5xl, .text-6xl, .text-7xl, .text-8xl, .text-9xl {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

p, .text-mist { color: rgba(199, 210, 224, 0.92) !important; font-weight: 400; }

/* Contact form inputs */
.contact-input {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    padding: 1.25rem !important;
    border-radius: 1rem !important;
    color: white !important;
    font-size: 1rem !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.contact-input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25) !important;
    transform: translateY(-2px);
}

html { scroll-padding-top: 90px; scroll-behavior: smooth; }

/* --- Loader (Chip-Boot statt wachsendem Baum) --------------------------- */
#loader {
    position: fixed; inset: 0;
    background: radial-gradient(circle at center, #0d1830 0%, #05070f 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 10000;
    transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    pointer-events: all;
}
#loader.fade-out {
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-100%) scale(1.1);
}
.loader-ring {
    width: 104px; height: 104px;
    position: relative; display: flex; align-items: center; justify-content: center;
    margin-bottom: 30px;
}
.loader-spinner {
    position: absolute; inset: 0; width: 100%; height: 100%;
    animation: loaderSpin 1.4s linear infinite;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.55));
    transform-origin: center;
}
.loader-spinner .track { opacity: 0.18; }
.loader-spinner .arc {
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 190;
}
.loader-chip {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(145deg, #16233e, #0a0f1c);
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 22px rgba(59, 130, 246, 0.4);
    position: relative;
    animation: chipPulse 1.8s ease-in-out infinite;
}
.loader-chip::before {
    content: ''; position: absolute; inset: 10px; border-radius: 4px;
    background: var(--accent-blue-bright);
    box-shadow: 0 0 12px var(--accent-blue-bright);
}
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes chipPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.25); }
}
.loader-text {
    color: var(--mist);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: 6px;
    text-transform: uppercase;
    font-size: 1rem;
    background: linear-gradient(to right, var(--mist), var(--accent-blue-bright), var(--mist));
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: shineText 3s linear infinite;
}
@keyframes shineText { to { background-position: 200% center; } }

/* --- Scroll progress bar ------------------------------------------------ */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-bright));
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.65);
    z-index: 10001;
    border-radius: 0 3px 3px 0;
}

/* --- Rounded modern UI ---------------------------------------------------*/
.glass-panel, .tech-card, .service-card, input, textarea, button {
    border-radius: 2.25rem !important;
}
.glass-panel {
    background: rgba(13, 24, 48, 0.85);
    backdrop-filter: blur(26px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.75);
}

/* --- Floating animation ---------------------------------------------------*/
.floating { animation: floating 6s ease-in-out infinite; }
@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Atmospheric background ------------------------------------------- */
.page-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -10;
    background:
        linear-gradient(var(--bg-overlay), rgba(4, 8, 18, 0.94)),
        url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&q=80&w=2000');
    background-size: cover; background-position: center;
}
@media (min-width: 1024px) {
    .page-bg { background-attachment: fixed; }
}
/* Subtle circuit grid overlay for extra tech texture */
.page-bg::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    mix-blend-mode: screen;
}

/* --- Button / link micro-interactions ------------------------------------*/
button, .nav-link, a.bg-accent-blue, a.bg-white\/5 {
    transition: all 0.35s var(--ease-smooth);
    position: relative; overflow: hidden;
}
button:active, a:active { transform: scale(0.96); }

/* Shine sweep on primary CTAs */
a.bg-accent-blue::before {
    content: '';
    position: absolute; top: 0; left: -75%;
    width: 45%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.85s var(--ease-smooth);
    pointer-events: none;
}
a.bg-accent-blue:hover::before { left: 130%; }
a.bg-accent-blue:hover {
    box-shadow: 0 12px 30px -6px rgba(59, 130, 246, 0.55);
    transform: translateY(-2px);
}

input, textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    color: white !important;
}
input:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.22) !important;
}

/* --- Cards -----------------------------------------------------------*/
.tech-card, .service-card {
    --spot-x: 50%; --spot-y: 50%;
}
.tech-card {
    background: linear-gradient(rgba(51, 65, 92, 0.12), rgba(51, 65, 92, 0.22));
    border: 1px solid rgba(51, 65, 92, 0.35);
    position: relative; overflow: hidden;
}
.tech-card::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.4;
    pointer-events: none;
}
/* Spotlight glow that follows the cursor */
.tech-card::after, .service-card::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle 240px at var(--spot-x) var(--spot-y), rgba(96, 165, 250, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.tech-card:hover::after, .service-card:hover::after { opacity: 1; }
.tech-card:hover, .service-card:hover {
    transform: translateY(-12px) scale(1.01);
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--accent-blue);
}
.service-card, .tech-card {
    transition: transform 0.6s var(--ease-bounce), box-shadow 0.6s var(--ease-bounce), background 0.4s ease, border-color 0.4s ease;
    position: relative;
}
.service-card:hover, .tech-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.55);
}

/* --- Nav link underline ----------------------------------------------- */
.nav-link { position: relative; padding: 0.5rem 0; transition: color 0.4s ease; }
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--accent-blue-bright);
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* --- Reveal animations --------------------------------------------------*/
@keyframes revealUp {
    0% { opacity: 0; transform: translateY(50px) scale(0.95); filter: blur(15px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.reveal { opacity: 0; visibility: hidden; will-change: transform, opacity, filter; }
.reveal.active { visibility: visible; animation: revealUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.reveal-group > * { opacity: 0; }
.reveal-group.active > *:nth-child(1) { animation: revealUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.08s; }
.reveal-group.active > *:nth-child(2) { animation: revealUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.16s; }
.reveal-group.active > *:nth-child(3) { animation: revealUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.24s; }
.reveal-group.active > *:nth-child(4) { animation: revealUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.32s; }

/* --- Info banner (kein Fake-Cookie-Consent, ehrlicher Hinweis) --------- */
#info-banner {
    position: fixed; bottom: 2rem; left: 2rem; right: 2rem; max-width: 420px;
    z-index: 1000;
    transform: translateY(200%);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#info-banner.active { transform: translateY(0); }

/* --- Mobile menu overlay ------------------------------------------------*/
#mobile-menu {
    position: fixed; inset: 0; width: 100%; height: 100vh;
    background: var(--noir);
    z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    visibility: hidden; pointer-events: none;
}
#mobile-menu.active { transform: translateX(0); visibility: visible; pointer-events: all; }

@media (max-width: 1024px) {
    .glass-panel {
        background: rgba(13, 24, 48, 0.96) !important;
        backdrop-filter: none !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    }
    .reveal.active { animation-duration: 0.6s !important; }
    .reveal-group.active > * { animation-duration: 0.5s !important; }
}

/* --- Mobile spacing polish ------------------------------------------------*/
@media (max-width: 640px) {
    .hero-content { padding-top: 1rem; }
    .p-16 { padding: 2.25rem !important; }
    .p-12 { padding: 1.75rem !important; }
    .p-10 { padding: 1.5rem !important; }
    #info-banner { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
}

/* --- Scrollbar ---------------------------------------------------------*/
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--noir); }
::-webkit-scrollbar-thumb { background: var(--circuit-slate); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
