/* ============================================
   Architectural Electronics — Custom Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Geometric Background Decorations
   ============================================ */
.geo-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.geo-circle--1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(224, 90, 69, 0.06) 0%, transparent 70%);
    top: 10%;
    right: -100px;
}

.geo-circle--2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.05) 0%, transparent 70%);
    bottom: 20%;
    left: -50px;
}

.geo-rect {
    position: absolute;
    pointer-events: none;
    border: 3px solid rgba(224, 90, 69, 0.08);
    transform: rotate(15deg);
}

.geo-rect--1 {
    width: 120px;
    height: 120px;
    top: 30%;
    left: 5%;
    border-radius: 16px;
}

.geo-triangle {
    position: absolute;
    pointer-events: none;
    width: 0;
    height: 0;
    border-style: solid;
}

.geo-triangle--1 {
    top: 60%;
    right: 8%;
    border-width: 0 50px 86px 50px;
    border-color: transparent transparent rgba(234, 179, 8, 0.06) transparent;
    transform: rotate(-15deg);
}

/* ============================================
   Floating Card Animations
   ============================================ */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-card-1 {
    animation: float-1 4s ease-in-out infinite;
}

.float-card-2 {
    animation: float-2 5s ease-in-out infinite;
}

.float-card-3 {
    animation: float-3 4.5s ease-in-out infinite;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.2s ease, border-color 0.2s ease, translate 0.2s ease;
    }

    .service-card.reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    .service-card.reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .gallery-item {
        opacity: 1;
        transform: scale(1);
    }

    .gallery-item.reveal {
        opacity: 0;
        transform: scale(0.95);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .gallery-item.reveal.visible {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ============================================
   Scroll Progress Bar
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 80px;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #a4271a, #eab308);
    z-index: 50;
    transition: width 0.1s linear;
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #a4271a;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
    z-index: 40;
    box-shadow: 8px 8px 0px 0px rgba(164, 39, 26, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 10px 10px 0px 0px rgba(164, 39, 26, 0.25);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .geo-circle--1 {
        width: 200px;
        height: 200px;
    }

    .geo-circle--2 {
        width: 150px;
        height: 150px;
    }

    .geo-rect--1 {
        width: 60px;
        height: 60px;
    }

    .geo-triangle--1 {
        border-width: 0 25px 43px 25px;
    }

    .float-card-1,
    .float-card-2,
    .float-card-3 {
        display: none;
    }
}

@media (max-width: 640px) {
    .scroll-progress {
        top: 80px;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }
}
