/* ============================================
   DEKORASYON UZMANI - MAIN STYLES
   Production-Ready CSS
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-primary-900: #0f172a;
    --color-primary-800: #1e293b;
    --color-primary-700: #334155;
    --color-accent-500: #f97316;
    --color-accent-600: #ea580c;
    --color-accent-400: #fb923c;
    --color-metal-400: #94a3b8;
    --color-metal-500: #64748b;
    --color-metal-600: #475569;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-accent: 0 10px 40px -10px rgba(249, 115, 22, 0.4);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ============================================
   BASE STYLES & RESET
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--color-primary-800);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Focus Visible Styles */
:focus-visible {
    outline: 2px solid var(--color-accent-500);
    outline-offset: 2px;
}

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary-900);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    z-index: 9999;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 1rem;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */

#navbar {
    background: transparent;
    transition: all var(--transition-base);
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-500);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 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.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.scroll-reveal:nth-child(2) { transition-delay: 100ms; }
.scroll-reveal:nth-child(3) { transition-delay: 200ms; }
.scroll-reveal:nth-child(4) { transition-delay: 300ms; }
.scroll-reveal:nth-child(5) { transition-delay: 400ms; }
.scroll-reveal:nth-child(6) { transition-delay: 500ms; }

/* ============================================
   SERVICE CARDS
   ============================================ */

.service-card {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-card .group-hover\:bg-accent-500 {
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ============================================
   PORTFOLIO ITEMS
   ============================================ */

.portfolio-item {
    transition: transform var(--transition-base);
}

.portfolio-item:hover {
    transform: scale(1.02);
}

.portfolio-item:focus {
    outline: 3px solid var(--color-accent-500);
    outline-offset: 2px;
}

/* ============================================
   FORM STYLES
   ============================================ */

input,
textarea,
select {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-accent-500);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-metal-400);
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

#back-to-top {
    transition: transform var(--transition-base), opacity var(--transition-base), background-color var(--transition-fast);
}

#back-to-top.visible {
    transform: translateY(0);
    opacity: 1;
}

#back-to-top:hover {
    transform: translateY(-4px);
}

/* ============================================
   MOBILE MENU
   ============================================ */

#mobile-menu {
    transition: opacity var(--transition-base), transform var(--transition-base);
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-badge {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--color-accent-400), var(--color-accent-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Reduced motion */
@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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :focus-visible {
        outline: 3px solid currentColor;
        outline-offset: 3px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    #navbar,
    #back-to-top,
    .btn-primary,
    #mobile-menu-btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .container {
        max-width: 100%;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
    
    .scroll-reveal {
        transition-delay: 0ms !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-accent-500);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   SELECTION STYLES
   ============================================ */

::selection {
    background: var(--color-accent-500);
    color: white;
}

::-moz-selection {
    background: var(--color-accent-500);
    color: white;
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--color-metal-400);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-metal-500);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-metal-400) #f1f5f9;
}
