/*
 * Deployfast - Cloud Deployment Platform Template
 * Premium SaaS design with cyan/teal branding
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
    /* Colors - Cyan/Teal Primary */
    --color-primary-50: #ecfeff;
    --color-primary-100: #cffafe;
    --color-primary-200: #a5f3fc;
    --color-primary-300: #67e8f9;
    --color-primary-400: #22d3ee;
    --color-primary-500: #06b6d4;
    --color-primary-600: #0891b2;
    --color-primary-700: #0e7490;
    --color-primary-800: #155e75;
    --color-primary-900: #164e63;

    /* Neutral colors (light mode) */
    --color-neutral-50: #fafafa;
    --color-neutral-100: #f5f5f5;
    --color-neutral-200: #e5e5e5;
    --color-neutral-300: #d4d4d4;
    --color-neutral-400: #a3a3a3;
    --color-neutral-500: #737373;
    --color-neutral-600: #525252;
    --color-neutral-700: #404040;
    --color-neutral-800: #262626;
    --color-neutral-900: #171717;

    /* 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-h4: 1.125rem;
    --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-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.3);
    --shadow-glow-lg: 0 0 80px rgba(6, 182, 212, 0.4);

    /* 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: 800ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-tertiary: #a3a3a3;
    --border-color: #e5e5e5;
}

/* Dark mode colors */
.dark {
    --color-neutral-50: #171717;
    --color-neutral-100: #262626;
    --color-neutral-200: #404040;
    --color-neutral-300: #525252;
    --color-neutral-400: #737373;
    --color-neutral-500: #a3a3a3;
    --color-neutral-600: #d4d4d4;
    --color-neutral-700: #e5e5e5;
    --color-neutral-800: #f5f5f5;
    --color-neutral-900: #fafafa;

    --bg-primary: #0a0a0a;
    --bg-secondary: #171717;
    --bg-tertiary: #262626;
    --text-primary: #fafafa;
    --text-secondary: #d4d4d4;
    --text-tertiary: #737373;
    --border-color: #262626;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--text-body);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

a {
    color: var(--color-primary-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-600);
}

/* Selection */
::selection {
    background-color: var(--color-primary-500);
    color: white;
}

::-moz-selection {
    background-color: var(--color-primary-500);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

/* 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: fixed;
    top: var(--space-4);
    left: var(--space-4);
    width: auto;
    height: auto;
    padding: var(--space-4);
    clip: auto;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--color-primary-500);
    border-radius: var(--radius-md);
    z-index: 9999;
}

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

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

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

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

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

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

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

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

.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 */
.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
   ========================================================================== */

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

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

.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);
}

.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%;
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

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

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

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

@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;
}

@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;
}

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--color-primary-500);
    animation: typing 3s steps(30) infinite;
}

/* Terminal cursor blink */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Grid patterns */
.bg-grid {
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid {
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
}

/* Gradient backgrounds */
.bg-mesh {
    background:
        radial-gradient(at 40% 20%, rgba(6, 182, 212, 0.3) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(34, 197, 94, 0.2) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(59, 130, 246, 0.2) 0px, transparent 50%);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow effects */
.glow {
    box-shadow: var(--shadow-glow);
}

.glow-lg {
    box-shadow: var(--shadow-glow-lg);
}

/* Code/Terminal styling */
.code-block {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    overflow-x: auto;
}

.dark .code-block {
    background-color: #1e1e1e;
    border-color: #333;
}

.terminal {
    background: linear-gradient(to bottom, #1e1e1e 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.terminal-header {
    background: #2d2d2d;
    padding: var(--space-3);
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-body {
    padding: var(--space-6);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: var(--text-small);
    color: #f0f0f0;
    line-height: 1.8;
}

.terminal-prompt {
    color: var(--color-primary-400);
}

.terminal-command {
    color: #f0f0f0;
}

.terminal-output {
    color: #10b981;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-primary {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--color-primary-600);
}

.dark .badge-primary {
    background-color: rgba(6, 182, 212, 0.2);
    color: var(--color-primary-400);
}

/* Status indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background: var(--color-success); box-shadow: 0 0 8px var(--color-success); }
.status-dot.offline { background: var(--color-neutral-400); }
.status-dot.warning { background: var(--color-warning); box-shadow: 0 0 8px var(--color-warning); }

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

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

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

.gpu-accelerate {
    transform: translateZ(0);
    will-change: transform;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    nav, footer, .no-print {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}
