/* ========================================
   House of Alund — Custom Styles
   ======================================== */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(45, 212, 191, 0.25);
    color: #f0fdf9;
}

/* ========================================
   Hero Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .reveal-stagger > * {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.0s; }
    .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
    .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
    .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.3s; }
    .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.4s; }
    .reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.5s; }
    
    .reveal-stagger.revealed > * {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible when reduced motion or no JS */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

#navbar.scrolled {
    background-color: rgba(2, 12, 27, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(45, 212, 191, 0.6);
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
#mobile-menu {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
    width: 24px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ========================================
   Scroll Line Animation
   ======================================== */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.6);
        transform-origin: top;
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1);
    }
}

/* ========================================
   Form Styles
   ======================================== */
.form-input {
    width: 100%;
}

.form-input:focus {
    border-color: rgba(45, 212, 191, 0.6) !important;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-input option {
    background-color: #0a192f;
    color: rgba(255, 255, 255, 0.7);
}

/* Custom Select Arrow */
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ========================================
   Parallax-like Hero Background
   ======================================== */
#hero-bg {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ========================================
   Button Hover Glow
   ======================================== */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.cta-primary:hover::before {
    left: 100%;
}

/* ========================================
   Image Hover Zoom
   ======================================== */
.aspect-square img,
.aspect-video iframe {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================
   Decorative Elements
   ======================================== */
.hero-eyebrow {
    will-change: opacity, transform;
}

/* ========================================
   Smooth Scroll Padding for Fixed Nav
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-headline span:last-child {
        font-size: 1.25rem !important;
    }
    
    section[id] {
        scroll-margin-top: 60px;
    }
}

@media (max-width: 640px) {
    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    .scroll-line,
    .cta-primary,
    .cta-secondary {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .font-serif, .font-sans {
        color: black !important;
    }
}
