[x-cloak] { display: none !important; }

::selection {
    background-color: #39FF14;
    color: #0d0d0d;
}

body {
    background-color: #0d0d0d;
    color: #f2f2f2;
    overflow-x: hidden;
    font-family: 'Oswald', sans-serif;
    animation: pageFadeIn 0.3s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d0d0d; }
::-webkit-scrollbar-thumb { background: #2c2c2c; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #39FF14; }

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

/* Nav Link Underline Effekt */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #39FF14;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Gemeinsame Hilfsklassen */
.text-stroke {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    color: transparent;
}

.diagonal-split {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

/* Gemeinsame Badge-Animation */
@keyframes pulse-glow {
    0%   { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(57, 255, 20, 0); }
    100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0); }
}
.glow-trigger { animation: pulse-glow 2s infinite; }


/* ── INDEX (page-index) ─────────────────────────────────────── */

.hero-gradient {
    background: linear-gradient(to bottom, rgba(13, 13, 13, 0.7) 0%, rgba(13, 13, 13, 1) 100%);
}

.amber-glow {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.diagonal-bg {
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}

/* Service Cards – Index (einfach) */
.page-index .service-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
}
.page-index .service-card:hover,
.page-index .service-card.in-view {
    transform: translateY(-10px) scale(1.02);
    border-color: #39FF14;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.rotate-badge { animation: rotate-slow 15s linear infinite; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(2rem); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ── ÜBER UNS (page-ueber-uns) ──────────────────────────────── */

.metal-brushed {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
}
.metal-brushed::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 1px,
        rgba(255, 255, 255, 0.02) 1px,
        rgba(255, 255, 255, 0.02) 2px
    );
    pointer-events: none;
}

.timeline-line {
    background: linear-gradient(to bottom, #39FF14 0%, #2c2c2c 100%);
    animation: revealLine 2s ease-out forwards;
}
@keyframes revealLine {
    from { height: 0; }
    to   { height: 100%; }
}

.team-card {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.team-card:hover,
.team-card.in-view {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(57, 255, 20, 0.1);
}
.team-card img { transition: transform 0.8s ease; }
.team-card:hover img,
.team-card.in-view img { transform: scale(1.1) grayscale(0); }

.clip-slant {
    clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%);
}


/* ── LEISTUNGEN (page-leistungen) ───────────────────────────── */

/* Service Cards – Leistungen (mit Sweep-Linie oben) */
.page-leistungen .service-card {
    position: relative;
    background: #1a1a1a;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}
.page-leistungen .service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #39FF14, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}
.page-leistungen .service-card:hover::before,
.page-leistungen .service-card.in-view::before {
    transform: translateX(100%);
}
.page-leistungen .service-card:hover,
.page-leistungen .service-card.in-view {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(57, 255, 20, 0.1);
    border-color: rgba(57, 255, 20, 0.3);
}

.img-zoom { transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1); }
.page-leistungen .service-card:hover .img-zoom,
.page-leistungen .service-card.in-view .img-zoom { transform: scale(1.1) rotate(1deg); }


/* ── REFERENZEN (page-referenzen) ───────────────────────────── */

.bento-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    transition: border-color 0.4s;
    pointer-events: none;
}
.bento-card:hover::after,
.bento-card.in-view::after {
    border-color: #39FF14;
}
.bento-card:hover,
.bento-card.in-view {
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.08);
}
.bento-img {
    transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1), filter 0.5s;
}
.bento-card:hover .bento-img,
.bento-card.in-view .bento-img {
    transform: scale(1.06);
    filter: grayscale(0%) !important;
}
.bento-arrow {
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
    transform: translate(-4px, 4px);
}
.bento-card:hover .bento-arrow,
.bento-card.in-view .bento-arrow {
    opacity: 1;
    transform: translate(0, 0);
}


/* ── KONTAKT (page-kontakt) ─────────────────────────────────── */

.form-field {
    width: 100%;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    color: #f2f2f2;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: 'Oswald', sans-serif;
}
.form-field:focus {
    border-color: #39FF14;
    box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.2);
}

.contact-block {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}
.contact-block:hover,
.contact-block.in-view { transform: translateX(4px); }

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #39FF14;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.contact-block:hover .contact-icon,
.contact-block.in-view .contact-icon {
    background: #39FF14;
    color: #0d0d0d;
}

/* Select-Pfeil in Lime */
select.form-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2339FF14' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ── Mobile Nav – immer sichtbar ─────────────────────────────── */
@media (max-width: 767px) {
    nav[x-data] {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

/* ── Grayscale → Farbe beim Einblenden (Touch/Mobile) ─────────── */
.service-card.in-view .grayscale,
.bento-card.in-view .grayscale,
img.in-view .grayscale {
    filter: grayscale(0%) !important;
}

/* ── Toast Notifications ─────────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: calc(100vw - 3rem);
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #39FF14;
    padding: 1rem 1.25rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    min-width: 280px;
    max-width: 420px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #39FF14;
    margin-bottom: 0.25rem;
    font-family: 'Oswald', sans-serif;
}

.toast.toast-error .toast-label {
    color: #ef4444;
}

.toast-message {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.toast-close {
    color: rgba(255, 255, 255, 0.35);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-top: 0.05rem;
    flex-shrink: 0;
    transition: color 0.2s;
    line-height: 1;
}

.toast-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 480px) {
    #toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .toast {
        min-width: 0;
        max-width: 100%;
    }
}
