/* ============================================
   Artline Services — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* ============================================
   Geometric Background Shapes (fixed)
   ============================================ */
.geo-shapes {
    pointer-events: none;
    z-index: 0;
}

.geo-shape-1 {
    position: absolute;
    top: 15%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(45, 122, 63, 0.06);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float-shape 20s ease-in-out infinite;
}

.geo-shape-2 {
    position: absolute;
    top: 45%;
    right: -3%;
    width: 200px;
    height: 200px;
    background: rgba(45, 122, 63, 0.05);
    border-radius: 50%;
    animation: float-shape 15s ease-in-out infinite reverse;
}

.geo-shape-3 {
    position: absolute;
    bottom: 10%;
    left: 10%;
    width: 150px;
    height: 150px;
    background: rgba(45, 122, 63, 0.04);
    border-radius: 20% 80% 40% 60% / 70% 30% 70% 30%;
    animation: float-shape 18s ease-in-out infinite;
}

.geo-shape-4 {
    position: absolute;
    top: 70%;
    right: 15%;
    width: 100px;
    height: 100px;
    background: rgba(45, 122, 63, 0.04);
    border-radius: 16px;
    transform: rotate(45deg);
    animation: float-shape 22s ease-in-out infinite reverse;
}

@keyframes float-shape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 15px) rotate(-3deg); }
    75% { transform: translate(20px, 10px) rotate(3deg); }
}

/* ============================================
   Navbar
   ============================================ */
.nav-header {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(26, 92, 58, 0.08);
    transition: box-shadow 0.3s ease;
}

.nav-header.scrolled {
    box-shadow: 0 4px 20px rgba(26, 92, 58, 0.1);
}

.nav-link {
    position: relative;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
}

.hero-geo {
    transition: transform 0.3s ease;
}

.hero-geo-1 { animation: hero-float-1 8s ease-in-out infinite; }
.hero-geo-2 { animation: hero-float-2 10s ease-in-out infinite; }
.hero-geo-3 { animation: hero-float-3 12s ease-in-out infinite; }
.hero-geo-4 { animation: hero-spin 20s linear infinite; }
.hero-geo-5 { animation: hero-float-4 9s ease-in-out infinite; }
.hero-geo-6 { animation: hero-pulse 4s ease-in-out infinite; }

@keyframes hero-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.05); }
}

@keyframes hero-float-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, 20px) rotate(10deg); }
}

@keyframes hero-float-3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(15px, -15px); }
    66% { transform: translate(-10px, 10px); }
}

@keyframes hero-spin {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes hero-float-4 {
    0%, 100% { transform: rotate(12deg) translate(0, 0); }
    50% { transform: rotate(12deg) translate(20px, -20px); }
}

@keyframes hero-pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* Badge */
.hero-badge {
    animation: badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.2s;
    opacity: 0;
}

@keyframes badge-pop {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hero text animations */
.hero h1 {
    animation: hero-text-up 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero p {
    animation: hero-text-up 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero .flex-col {
    animation: hero-text-up 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero .grid {
    animation: hero-text-up 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 1s;
    opacity: 0;
}

@keyframes hero-text-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-primary:hover::after {
    opacity: 1;
}

/* ============================================
   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, #1a5c3a, #4d9158);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

/* ============================================
   Why Cards
   ============================================ */
.why-card {
    perspective: 1000px;
}

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

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

    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.15s; }
    .reveal:nth-child(4) { transition-delay: 0.2s; }
    .reveal:nth-child(5) { transition-delay: 0.25s; }
    .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* When JS is disabled, reveal classes don't hide content */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu {
    animation: slide-down 0.3s ease;
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-link {
    transition: all 0.2s ease;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767px) {
    .nav-header {
        background: rgba(250, 249, 246, 0.98);
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero h1 br {
        display: none;
    }

    .service-card,
    .why-card > div {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero h1 {
        font-size: 3rem;
    }
}

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1a5c3a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Selection color
   ============================================ */
::selection {
    background: rgba(45, 122, 63, 0.2);
    color: #1a5c3a;
}
