/* ============================================
   Cristalería Niebla - Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.4;
}

.geo-circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,107,74,0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: 10%;
    right: -100px;
    animation: float-slow 8s ease-in-out infinite;
}

.geo-circle-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,107,74,0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 20%;
    left: -50px;
    animation: float-slow 10s ease-in-out infinite reverse;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255,107,74,0.2);
    top: 35%;
    left: 5%;
    transform: rotate(45deg);
    animation: spin-slow 20s linear infinite;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(255,107,74,0.08);
    top: 60%;
    right: 8%;
    animation: float-slow 6s ease-in-out infinite;
}

.geo-ring-1 {
    width: 180px;
    height: 180px;
    border: 3px solid rgba(255,107,74,0.12);
    border-radius: 50%;
    bottom: 15%;
    right: 15%;
    animation: spin-slow 15s linear infinite reverse;
}

/* ============================================
   Floating Cards Animation
   ============================================ */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: 1s;
}

.card-3 {
    animation-delay: 2s;
}

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

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

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

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B4A;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
.menu-line {
    display: block;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 5px;
    background: #FF6B4A;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

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

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

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

/* ============================================
   Gallery Items
   ============================================ */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,107,74,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    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; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: rgba(255, 107, 74, 0.4);
    color: white;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1A1A1A;
}

::-webkit-scrollbar-thumb {
    background: #3D3D3D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF6B4A;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 250px;
        height: 250px;
    }
    
    .geo-circle-2 {
        width: 150px;
        height: 150px;
    }
    
    .floating-card {
        display: none;
    }
    
    .floating-card.card-2 {
        display: block;
        position: relative;
        margin-top: 1rem;
        animation: float 4s ease-in-out infinite;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.75rem !important;
    }
    
    .geo-square-1,
    .geo-triangle-1,
    .geo-ring-1 {
        display: none;
    }
}
