/* ========================================
   iAdvance Now - Custom Styles
   Premium Fintech Aesthetic
   ======================================== */

/* CSS Custom Properties */
:root {
    --navy-50: #f0f4f8;
    --navy-100: #d9e2ec;
    --navy-200: #bcccdc;
    --navy-300: #9fb3c8;
    --navy-400: #829ab1;
    --navy-500: #627d98;
    --navy-600: #486581;
    --navy-700: #334e68;
    --navy-800: #243b53;
    --navy-900: #102a43;
    --navy-950: #0a1628;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --success: #10b981;

    /* Timing Functions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   Global Styles
   ======================================== */

/* Smooth scrolling for anchors */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: var(--sky-500);
    color: white;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--sky-500);
    outline-offset: 2px;
}

/* ========================================
   Typography Enhancements
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--sky-400) 0%, var(--sky-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Button Styles
   ======================================== */

.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--sky-600) 0%, var(--sky-500) 100%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
    z-index: -1;
}

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

.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--sky-500);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-smooth);
}

.btn-secondary:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========================================
   Card Styles
   ======================================== */

.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-hover {
    transition: all 0.4s var(--ease-smooth);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(10, 22, 40, 0.15);
}

.card-highlight {
    position: relative;
    overflow: hidden;
}

.card-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s var(--ease-smooth);
}

.card-highlight:hover::before {
    left: 100%;
}

/* ========================================
   Icon Boxes
   ======================================== */

.icon-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy-50) 0%, var(--navy-100) 100%);
    transition: all 0.3s var(--ease-smooth);
}

.icon-box-sky {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(14, 165, 233, 0.2) 100%);
}

.icon-box:hover {
    transform: scale(1.1) rotate(5deg);
}

/* ========================================
   Stats Counter Animation
   ======================================== */

.stat-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--sky-500) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========================================
   Section Decorations
   ======================================== */

.section-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--navy-200), transparent);
}

.section-dots {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--sky-500);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ========================================
   Testimonial Cards
   ======================================== */

.testimonial-card {
    position: relative;
    padding: 2rem;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(10, 22, 40, 0.05), 0 2px 4px -1px rgba(10, 22, 40, 0.03);
    transition: all 0.4s var(--ease-smooth);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(10, 22, 40, 0.12);
}

.testimonial-content {
    position: relative;
    z-index: 1;
}

/* ========================================
   Process Steps
   ======================================== */

.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(100% + 1rem);
    width: calc(100% - 2rem);
    height: 2px;
    background: linear-gradient(90deg, var(--sky-500), var(--navy-200));
}

.process-step:last-child::after {
    display: none;
}

.process-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-400) 0%, var(--sky-600) 100%);
    color: white;
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 10px 30px -5px rgba(14, 165, 233, 0.4);
    transition: all 0.3s var(--ease-smooth);
}

.process-step:hover .process-number {
    transform: scale(1.15);
    box-shadow: 0 15px 40px -5px rgba(14, 165, 233, 0.5);
}

/* ========================================
   FAQ Accordion
   ======================================== */

.faq-item {
    border: 1px solid var(--navy-100);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s var(--ease-smooth);
}

.faq-item:hover {
    border-color: var(--navy-200);
    box-shadow: 0 4px 12px rgba(10, 22, 40, 0.05);
}

.faq-question {
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--navy-900);
    transition: all 0.3s var(--ease-smooth);
}

.faq-question:hover {
    color: var(--sky-600);
}

.faq-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--navy-100);
    transition: all 0.3s var(--ease-smooth);
}

.faq-item.active .faq-icon {
    background: var(--sky-500);
    color: white;
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-smooth), padding 0.4s var(--ease-smooth);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

/* ========================================
   Form Styles
   ======================================== */

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--navy-100);
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--navy-900);
    background: white;
    transition: all 0.3s var(--ease-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--sky-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.form-input::placeholder {
    color: var(--navy-400);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--navy-700);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23627d98' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* ========================================
   Progress Steps (Application)
   ======================================== */

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--navy-100);
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.progress-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--navy-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--navy-400);
    transition: all 0.3s var(--ease-smooth);
}

.progress-step.active .progress-dot {
    background: var(--sky-500);
    border-color: var(--sky-500);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.progress-step.completed .progress-dot {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy-400);
}

.progress-step.active .progress-label,
.progress-step.completed .progress-label {
    color: var(--navy-700);
}

/* ========================================
   Scroll Animations
   ======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease-smooth);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-100 { transition-delay: 0.1s; }
.animate-delay-200 { transition-delay: 0.2s; }
.animate-delay-300 { transition-delay: 0.3s; }
.animate-delay-400 { transition-delay: 0.4s; }
.animate-delay-500 { transition-delay: 0.5s; }

/* ========================================
   Loading States
   ======================================== */

.loading-shimmer {
    background: linear-gradient(90deg, var(--navy-100) 25%, var(--navy-50) 50%, var(--navy-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Trust Badges
   ======================================== */

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--navy-50);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy-700);
    transition: all 0.3s var(--ease-smooth);
}

.trust-badge:hover {
    background: var(--navy-100);
    transform: translateY(-2px);
}

.trust-badge svg {
    color: var(--sky-500);
}

/* ========================================
   Hero Section Enhancements
   ======================================== */

.hero-gradient {
    background: linear-gradient(180deg, rgba(240, 244, 248, 0.95) 0%, rgba(240, 244, 248, 0.6) 60%, rgba(255, 255, 255, 1) 100%);
}

.hero-pattern {
    background-image: radial-gradient(circle at 1px 1px, var(--navy-200) 1px, transparent 0);
    background-size: 40px 40px;
    opacity: 0.5;
}

/* ========================================
   Mobile Enhancements
   ======================================== */

@media (max-width: 768px) {
    .process-step::after {
        display: none;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* ========================================
   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;
    }
}
