/* ===== Custom Styles for Krugfab & Welding ===== */

/* --- Hero Geometric Shapes --- */
.shape-circle-1 {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
    top: -80px;
    left: -120px;
    animation: float-slow 12s ease-in-out infinite;
}

.shape-circle-2 {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.08) 0%, transparent 70%);
    bottom: 10%;
    right: 5%;
    animation: float-slow 10s ease-in-out infinite reverse;
}

.shape-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(5, 150, 105, 0.06);
    top: 25%;
    right: 2%;
    transform: rotate(15deg);
    animation: spin-slow 20s linear infinite;
}

.shape-dots {
    position: absolute;
    bottom: 15%;
    left: 8%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    opacity: 0.3;
}

.shape-dots::before,
.shape-dots::after {
    content: '';
}

.shape-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(5, 150, 105, 0.3);
}

/* --- Animations --- */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-24px) rotate(3deg); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Hero Geometric Elements (SVG-based) --- */
.hero-geo {
    will-change: transform;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #059669, #D4A017);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* --- Gallery --- */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 78, 59, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* --- Process Steps --- */
.process-step::before {
    content: '';
    display: block;
    position: absolute;
    top: 32px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 2px;
    background: repeating-linear-gradient(90deg, #059669 0px, #059669 6px, transparent 6px, transparent 12px);
    opacity: 0.3;
}

.process-step:last-child::before {
    display: none;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* --- Navbar scroll state --- */
.nav-scrolled {
    background: rgba(253, 246, 227, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* --- Mobile menu animation --- */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Smooth scrollbar --- */
html {
    scroll-behavior: smooth;
}

/* --- Selection color --- */
::selection {
    background: rgba(5, 150, 105, 0.2);
    color: #064E3B;
}

/* --- Focus visible --- */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* --- Responsive tweaks --- */
@media (max-width: 768px) {
    .shape-circle-1 {
        width: 250px;
        height: 250px;
    }

    .shape-circle-2 {
        width: 160px;
        height: 160px;
    }

    .shape-triangle {
        border-left-width: 40px;
        border-right-width: 40px;
        border-bottom-width: 69px;
    }
}
