/* Flow Tattoo Studio - Premium Landing Page Styles */

/* Performance and Font Optimizations */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@font-face {
    font-family: 'Inter';
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    font-display: swap;
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #DC2626;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced Focus States for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #DC2626;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(220, 38, 38, 0.6);
    }
}

/* Utility Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

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

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

/* Hover Effects and Transitions */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Glass Morphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Effects */
.gradient-primary {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 50%, #991B1B 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #111827 0%, #1F2937 50%, #374151 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #DC2626, #F87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section Enhancements */
.hero-gradient {
    position: relative;
    background: linear-gradient(135deg, #111827 0%, #1F2937 30%, #374151 70%, #4B5563 100%);
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(34, 197, 94, 0.05) 0%, transparent 40%);
    z-index: 1;
}

/* Button Enhancements */
.btn-primary {
    position: relative;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4);
}

/* Card Enhancements */
.service-card {
    position: relative;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #DC2626, #F87171);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(220, 38, 38, 0.2);
}

/* Image Effects */
img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.image-hover-zoom {
    overflow: hidden;
    border-radius: 1rem;
}

.image-hover-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Gallery Enhancements */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(220, 38, 38, 0.8), rgba(185, 28, 28, 0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Modal Enhancements */
.modal-backdrop {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Enhancements */
.form-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #E5E7EB;
    background: white;
}

.form-input:focus {
    border-color: #DC2626;
    background: #FEFEFE;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #D1D5DB;
}

/* FAQ Enhancements */
.faq-item {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    border-color: #DC2626;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.1);
}

.faq-button {
    transition: background-color 0.3s ease;
}

.faq-button:hover {
    background: #F9FAFB;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #DC2626;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Indicators */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #DC2626, #F87171);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Scroll Indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(220, 38, 38, 0.2);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, #DC2626, #F87171);
    transition: width 0.1s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Increase touch targets */
    button,
    a[role="button"],
    .faq-button {
        min-height: 48px;
        padding: 12px 20px;
    }
    
    /* Improve readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    /* Optimize spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Service cards stack better */
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    /* FAQ improvements */
    .faq-item {
        margin-bottom: 0.5rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .service-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    .gallery-item:hover {
        transform: scale(1.03);
    }
}

/* Large Screen Enhancements */
@media (min-width: 1200px) {
    .hero-gradient {
        min-height: 100vh;
    }
    
    .container {
        max-width: 1200px;
    }
    
    .service-card:hover {
        transform: translateY(-10px) scale(1.03);
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-gradient {
        background-attachment: fixed;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .glass-effect {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary,
    .service-card,
    .faq-item {
        border: 2px solid currentColor;
    }
    
    .hero-gradient {
        background: #000;
        color: #fff;
    }
}

/* Reduced Motion Support */
@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;
    }
    
    .parallax {
        transform: none !important;
    }
}

/* Print Styles */
@media print {
    .no-print,
    header,
    .modal-backdrop,
    .floating-cta {
        display: none !important;
    }
    
    * {
        color: #000 !important;
        background: #fff !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a[href^="tel:"]::after {
        content: " (" attr(href) ")";
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #DC2626, #B91C1C);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #B91C1C, #991B1B);
}

/* Selection Colors */
::selection {
    background: #DC2626;
    color: white;
}

::-moz-selection {
    background: #DC2626;
    color: white;
}

/* Error States */
.error {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Success States */
.success {
    border-color: #10B981 !important;
    background-color: #F0FDF4 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Warning States */
.warning {
    border-color: #F59E0B !important;
    background-color: #FFFBEB !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1) !important;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.box-shadow-xl {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Performance Hints */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU Acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

/* Critical CSS for Above-the-Fold */
.hero-section {
    contain: layout style paint;
}

/* Intersection Observer Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Advanced Grid Layouts */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: start;
}

/* Aspect Ratio Utilities */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-photo {
    aspect-ratio: 4 / 3;
}