/* ===================================
   CUSTOM STYLES - Cronorise
   =================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Colors */
::selection {
    background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    color: #030712;
}

::-webkit-selection {
    background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    color: #030712;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
}

/* Links */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* Buttons - Enhanced */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

button:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* Feature Cards */
.feature-card {
    transition: all 0.4s ease;
    transform-origin: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.1);
}

/* Period Filter Cards */
.period-filter {
    transition: all 0.4s ease;
}

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

.period-filter:active {
    transform: scale(0.98);
}

/* Step Cards */
.step-card {
    transition: all 0.4s ease;
}

.step-card:hover {
    transform: translateY(-4px);
}

/* Backdrop Effects */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}

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

/* Glow Effects */
.glow-cyan {
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.glow-blue {
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

/* Custom Utility Classes */
.glass-effect {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-effect:hover {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background-clip: padding-box;
    border: 2px solid transparent;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)),
        linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    background-origin: border, border;
    background-clip: padding-box, border-box;
}

/* Smooth Transitions */
.ease-out-cubic {
    transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

.ease-in-out-cubic {
    transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Active States */
.active-link {
    color: #06b6d4;
    position: relative;
}

.active-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4 0%, #2563eb 100%);
}

/* Hover Text Effects */
.hover-lift {
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    text-shadow: 0 10px 20px rgba(6, 182, 212, 0.3);
}

/* Loading State */
.skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

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

/* Responsive Typography */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: clamp(2rem, 8vw, 4rem);
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }
    
    h3 {
        font-size: clamp(1.25rem, 4vw, 1.875rem);
    }
}

/* Accessibility */
.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-visible:focus {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Dark Mode (already dark, but for compatibility) */
@media (prefers-color-scheme: dark) {
    body {
        color-scheme: dark;
    }
}

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

/* Utility Spacing Classes */
.gap-xs {
    gap: 0.25rem;
}

.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 1rem;
}

.gap-lg {
    gap: 1.5rem;
}

.gap-xl {
    gap: 2rem;
}

/* Custom Shadows */
.shadow-glow-cyan {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
}

.shadow-glow-blue {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

.shadow-glow-purple {
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.3);
}

/* Smooth Grid */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Text Truncation Utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
