/**
 * FinoAi Landing Page - Custom Styles
 * Separated from HTML for better performance and SEO
 */

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

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

/* Focus visible styles for better keyboard navigation */
*:focus-visible {
    outline: 2px solid #00BFFF;
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@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;
    }
}

/* Basic Styles */
.gradient-bg {
    background: #0D1117;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(46, 71, 231, 0.4) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%),
        url('assets/images/hero-background.png');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: contain;
    background-blend-mode: lighten;
}

/* Hero Section Animations */
.fade-in-left {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Section Fade In Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 32px !important;
        line-height: 1.2;
    }
    
    .hero-content .space-y-8 {
        gap: 1.5rem;
    }
    
    .floating {
        max-width: 280px;
        height: auto;
    }
    
    .floating img {
        width: 280px !important;
        height: 500px !important;
    }
    
    /* Process section mobile fixes */
    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Download section mobile fixes */
    .download-card {
        width: 100% !important;
        max-width: 400px !important;
        height: auto !important;
    }
    
    /* Navigation mobile fixes */
    .flex.items-center.space-x-6 {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    /* Statistics section mobile fixes */
    .flex.items-center.space-x-8 {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 28px !important;
    }
    
    .floating img {
        width: 240px !important;
        height: 420px !important;
    }
    
    .download-card {
        width: 100% !important;
        max-width: 350px !important;
        height: auto !important;
        padding: 16px !important;
    }
    
    /* Smaller spacing on mobile */
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Tablet responsive fixes */
@media (min-width: 769px) and (max-width: 1024px) {
    .feature-card {
        width: 280px !important;
    }
    
    .download-card {
        max-width: 450px;
    }
}

/* Large screen optimizations */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 1400px;
    }
}

/* Section Progress Line */
.section-progress-container {
    position: relative;
    width: 2px;
    height: 300px;
    margin: 60px auto;
    z-index: 1;
}

.section-progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1px;
}

.section-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #40ffaa, #4079ff, #40ffaa);
    border-radius: 1px;
    transition: height 0.3s ease-out;
    box-shadow: 0 0 8px rgba(64, 255, 170, 0.3);
}

@media (max-width: 768px) {
    .section-progress-container {
        width: 1.5px;
        height: 200px;
        margin: 40px auto;
    }
}

/* Header Hide Animation */
.header-hidden {
    transform: translateY(-100%);
    transition: transform 0.5s ease-in-out;
}

/* Scroll Line */
#scroll-line {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #00c6ff 0%, #0072ff 100%);
    border-radius: 3px;
    opacity: 0;
    transition: height 0.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease;
    z-index: 999;
}

#scroll-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    z-index: -1;
}

#scroll-line.active {
    opacity: 1;
}

#scroll-line.active::before {
    opacity: 1;
}

/* FAQ Styles */
.faq-content {
    max-height: 0;
    overflow: hidden;
    padding-bottom: 0;
    transition: max-height 0.4s ease-in-out, padding-bottom 0.4s ease-in-out;
}

.faq-content.open {
    max-height: 500px;
    padding-bottom: 24px;
}

.faq-item.open {
    border-color: transparent !important;
}

/* Header Hide/Show */
header.hidden {
    transform: translateY(-120%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Star Border Animation */
.star-border-btn {
    position: relative;
    border-radius: 8px;
    padding: 1px;
    background: black;
    overflow: visible;
}

.star-border-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(45deg, #00BFFF, #00FFFF, #00BFFF, #0099CC);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateBorder 5s linear infinite;
    pointer-events: none;
}

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

.star-border-btn .btn-inner {
    position: relative;
    z-index: 1;
    background: black;
    border-radius: 7px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glare Hover Effect */
.glare-button {
    position: relative;
    overflow: hidden;
}

.glare-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        -30deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%,
        transparent 100%
    );
    transform: translateX(-100%) translateY(-100%) rotate(-30deg);
    transition: transform 800ms ease;
    pointer-events: none;
    z-index: 1;
}

.glare-button:hover::before {
    transform: translateX(100%) translateY(100%) rotate(-30deg);
}

.glare-button > * {
    position: relative;
    z-index: 2;
}

/* Spotlight Card Effect */
.card-spotlight {
    position: relative;
    overflow: hidden;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.card-spotlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(64, 255, 170, 0.25),
        rgba(64, 121, 255, 0.15),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

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

.card-spotlight > * {
    position: relative;
    z-index: 2;
}

/* Magic Card Effects */
.magic-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Ripple effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 1000;
    animation: ripple-animation 0.8s ease-out forwards;
}

@keyframes ripple-animation {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* ChromaGrid Team Cards */
.chroma-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 320px);
    grid-auto-rows: auto;
    justify-content: center;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    --x: 50%;
    --y: 50%;
    --r: 300px;
}

@media (max-width: 1124px) {
    .chroma-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 320px));
        gap: 0.5rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .chroma-grid {
        grid-template-columns: 320px;
        gap: 0.75rem;
        padding: 1rem;
    }
}

.chroma-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 320px;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #333;
    transition: border-color 0.3s ease;
    --mouse-x: 50%;
    --mouse-y: 50%;
    --spotlight-color: rgba(255, 255, 255, 0.3);
}

.chroma-card:hover {
    border-color: var(--card-border);
}

.chroma-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}

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

.chroma-img-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 10px;
    box-sizing: border-box;
    background: transparent;
    transition: background 0.3s ease;
}

.chroma-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.chroma-info {
    position: relative;
    z-index: 1;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 0.25rem;
    column-gap: 0.75rem;
}

.chroma-info .name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    grid-column: 1 / -1;
}

.chroma-info .role {
    color: #aaa;
    font-size: 14px;
    margin: 0;
    grid-column: 1 / -1;
}

.chroma-info .handle {
    color: #888;
    font-size: 12px;
    grid-column: 1 / -1;
}

.chroma-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: rgba(0, 0, 0, 0.001);
    mask-image: radial-gradient(circle var(--r) at var(--x) var(--y),
        transparent 0%,
        transparent 15%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.22) 45%,
        rgba(0, 0, 0, 0.35) 60%,
        rgba(0, 0, 0, 0.5) 75%,
        rgba(0, 0, 0, 0.68) 88%,
        white 100%
    );
    -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y),
        transparent 0%,
        transparent 15%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.22) 45%,
        rgba(0, 0, 0, 0.35) 60%,
        rgba(0, 0, 0, 0.5) 75%,
        rgba(0, 0, 0, 0.68) 88%,
        white 100%
    );
}

.chroma-fade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: rgba(0, 0, 0, 0.001);
    mask-image: radial-gradient(circle var(--r) at var(--x) var(--y),
        white 0%,
        white 15%,
        rgba(255, 255, 255, 0.9) 30%,
        rgba(255, 255, 255, 0.78) 45%,
        rgba(255, 255, 255, 0.65) 60%,
        rgba(255, 255, 255, 0.5) 75%,
        rgba(255, 255, 255, 0.32) 88%,
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y),
        white 0%,
        white 15%,
        rgba(255, 255, 255, 0.9) 30%,
        rgba(255, 255, 255, 0.78) 45%,
        rgba(255, 255, 255, 0.65) 60%,
        rgba(255, 255, 255, 0.5) 75%,
        rgba(255, 255, 255, 0.32) 88%,
        transparent 100%
    );
    opacity: 1;
    transition: opacity 0.6s ease;
}

/* Animated Gradient Text */
.animated-gradient-text {
    position: relative;
    display: inline-block;
    background-image: linear-gradient(to right, #40ffaa, #4079ff, #40ffaa, #4079ff, #40ffaa);
    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradient-animation 8s linear infinite;
    font-weight: 700;
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
