/* ============================================
   Your CFO Solutions — 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 {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: #059669;
    color: white;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 94, 59, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
.mobile-nav-link {
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-link:hover {
    color: #059669;
    transform: translateX(8px);
}

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

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #059669;
    color: white;
    padding: 14px 28px;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #059669;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #047857, #065f46);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.btn-primary span,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(5, 150, 105, 0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #064e3b;
    padding: 14px 28px;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #064e3b;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #064e3b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(6, 78, 59, 0.2);
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #064e3b;
    padding: 16px 32px;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    background: #f0fdf4;
}

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: white;
    padding: 16px 32px;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-outline-white:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   Geometric Shapes (Hero Background)
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    animation: float 6s ease-in-out 1s infinite;
}

.rect-1 {
    width: 120px;
    height: 120px;
    background: #059669;
    opacity: 0.04;
    border-radius: 24px;
    top: 20%;
    right: 15%;
    transform: rotate(45deg);
    animation: float 7s ease-in-out 0.5s infinite;
}

.rect-2 {
    width: 80px;
    height: 80px;
    background: #10b981;
    opacity: 0.06;
    border-radius: 16px;
    bottom: 25%;
    right: 30%;
    transform: rotate(20deg);
    animation: float 5s ease-in-out 2s infinite;
}

.triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(16, 185, 129, 0.05);
    top: 40%;
    left: 3%;
    animation: float 9s ease-in-out 1.5s infinite;
}

.dot-grid {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, rgba(5, 150, 105, 0.12) 1px, transparent 1px);
    background-size: 20px 20px;
    bottom: 15%;
    right: 5%;
    opacity: 0.6;
}

/* ============================================
   Scroll Indicator
   ============================================ */
@keyframes scrollIndicator {
    0% { top: -100%; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* ============================================
   Marquee
   ============================================ */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   Approach Steps
   ============================================ */
.approach-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.approach-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ============================================
   Image Wrapper
   ============================================ */
.hero-image-wrapper {
    perspective: 1000px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .geo-shape {
        display: none;
    }
    
    .circle-1 {
        width: 300px;
        height: 300px;
    }
    
    .circle-2 {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 640px) {
    #navbar {
        background: rgba(254, 253, 248, 0.98);
        backdrop-filter: blur(20px);
    }
}

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

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
