/* ==========================================================================
   VAULT - Finance/Banking SaaS Template
   A professional, trust-building design with navy and emerald theme
   ========================================================================== */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* Brand Colors - Navy & Emerald */
    --color-primary: #1E3A5F;
    --color-primary-dark: #152B47;
    --color-primary-light: #2A4D7C;
    --color-accent: #10B981;
    --color-accent-dark: #059669;
    --color-accent-light: #34D399;

    /* Neutral Colors */
    --color-white: #FFFFFF;
    --color-neutral-50: #F9FAFB;
    --color-neutral-100: #F3F4F6;
    --color-neutral-200: #E5E7EB;
    --color-neutral-300: #D1D5DB;
    --color-neutral-400: #9CA3AF;
    --color-neutral-500: #6B7280;
    --color-neutral-600: #4B5563;
    --color-neutral-700: #374151;
    --color-neutral-800: #1F2937;
    --color-neutral-900: #111827;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;

    /* Typography Scale */
    --text-hero: clamp(3rem, 8vw, 6rem);
    --text-display: clamp(2.5rem, 5vw, 4rem);
    --text-h1: clamp(2rem, 4vw, 3rem);
    --text-h2: clamp(1.5rem, 3vw, 2.25rem);
    --text-h3: clamp(1.25rem, 2vw, 1.5rem);
    --text-body: 1rem;
    --text-small: 0.875rem;
    --text-xs: 0.75rem;

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --color-primary: #3B5A87;
    --color-primary-dark: #1E3A5F;
    --color-primary-light: #4A6A9E;
    --color-accent: #10B981;
    --color-accent-dark: #059669;
    --color-accent-light: #34D399;

    --color-white: #0A0A0A;
    --color-neutral-50: #18181B;
    --color-neutral-100: #27272A;
    --color-neutral-200: #3F3F46;
    --color-neutral-300: #52525B;
    --color-neutral-400: #71717A;
    --color-neutral-500: #A1A1AA;
    --color-neutral-600: #D4D4D8;
    --color-neutral-700: #E4E4E7;
    --color-neutral-800: #F4F4F5;
    --color-neutral-900: #FAFAFA;
}

/* ==========================================================================
   GLOBAL STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-white);
    color: var(--color-neutral-900);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

/* Fade up (default) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-smooth),
                transform var(--transition-smooth);
}

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

/* Fade from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all var(--transition-smooth);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Fade from right */
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all var(--transition-smooth);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in */
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all var(--transition-smooth);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Blur in */
.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all var(--transition-smooth);
}

.reveal-blur.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Stagger delays for grid items */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ==========================================================================
   HOVER ANIMATIONS
   ========================================================================== */

/* Card lift */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* Image zoom */
.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-zoom:hover img {
    transform: scale(1.05);
}

/* Shine effect */
.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::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.5s ease;
}

.hover-shine:hover::before {
    left: 100%;
}

/* Button hover */
.btn-hover-scale {
    transition: transform var(--transition-fast);
}

.btn-hover-scale:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   CONTINUOUS ANIMATIONS
   ========================================================================== */

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Pulse ring */
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient shift */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Subtle bounce */
@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-bounce-subtle {
    animation: subtle-bounce 2s ease-in-out infinite;
}

/* Spin animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   PRICING TOGGLE STYLES
   ========================================================================== */

.pricing-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.toggle-switch {
    position: relative;
    width: 64px;
    height: 32px;
    background-color: var(--color-neutral-200);
    border-radius: 16px;
    cursor: pointer;
    transition: background-color var(--transition-base);
}

.toggle-switch.active {
    background-color: var(--color-accent);
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background-color: var(--color-white);
    border-radius: 50%;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-md);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(32px);
}

.toggle-label {
    font-weight: 500;
    color: var(--color-neutral-600);
    transition: color var(--transition-base);
}

.toggle-label.active {
    color: var(--color-neutral-900);
}

/* ==========================================================================
   FAQ ACCORDION STYLES
   ========================================================================== */

.faq-item {
    border-bottom: 1px solid var(--color-neutral-200);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 0;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-neutral-900);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition-base);
}

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

.faq-icon {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base), padding var(--transition-base);
}

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

.faq-answer p {
    color: var(--color-neutral-600);
    line-height: 1.7;
}

/* ==========================================================================
   TRUST BADGE STYLES
   ========================================================================== */

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-neutral-50);
    border-radius: 0.5rem;
    border: 1px solid var(--color-neutral-200);
    transition: all var(--transition-base);
}

.trust-badge:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.trust-badge-icon {
    width: 32px;
    height: 32px;
    color: var(--color-accent);
}

.trust-badge-text {
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-neutral-700);
}

/* ==========================================================================
   FEATURE CARD STYLES
   ========================================================================== */

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: 12px;
    color: white;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   BACKGROUND DECORATIONS
   ========================================================================== */

.bg-grid {
    background-image:
        linear-gradient(rgba(30, 58, 95, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 58, 95, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

[data-theme="dark"] .bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.gradient-overlay {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-neutral-300);
    border-radius: 0.5rem;
    font-size: var(--text-body);
    color: var(--color-neutral-900);
    background-color: var(--color-white);
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.error {
    border-color: var(--color-error);
}

.form-error {
    color: var(--color-error);
    font-size: var(--text-small);
    margin-top: 0.25rem;
    display: none;
}

.form-error.active {
    display: block;
}

/* ==========================================================================
   COMPARISON TABLE STYLES
   ========================================================================== */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.comparison-table th,
.comparison-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-neutral-200);
}

.comparison-table th {
    background-color: var(--color-neutral-50);
    font-weight: 600;
    color: var(--color-neutral-900);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-checkmark {
    color: var(--color-success);
    width: 24px;
    height: 24px;
}

.comparison-cross {
    color: var(--color-neutral-400);
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   REDUCED MOTION (REQUIRED)
   ========================================================================== */

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

    .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-blur {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ==========================================================================
   RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 768px) {
    .pricing-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .comparison-table {
        font-size: var(--text-small);
    }

    .comparison-table th,
    .comparison-table td {
        padding: 1rem;
    }
}
