/* 
 * Theme Name: Omnitool
 * Description: Global design system foundation
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
    /* Colors - Primary (Indigo) */
    --color-primary: hsl(245, 85%, 60%);
    --color-primary-light: hsl(245, 85%, 70%);
    --color-primary-dark: hsl(245, 85%, 50%);
    --color-primary-glow: hsla(245, 85%, 60%, 0.3);

    /* Colors - Secondary (Teal) */
    --color-secondary: hsl(170, 75%, 50%);
    --color-secondary-light: hsl(170, 75%, 60%);
    --color-secondary-dark: hsl(170, 75%, 40%);

    /* Colors - Surface */
    --color-surface: hsl(228, 25%, 12%);
    --color-surface-raised: hsl(228, 25%, 16%);
    --color-surface-input: hsl(228, 25%, 20%);
    --color-surface-border: hsl(228, 15%, 25%);

    /* Colors - Text */
    --color-text-primary: hsl(0, 0%, 95%);
    --color-text-secondary: hsl(0, 0%, 65%);
    --color-text-muted: hsl(0, 0%, 45%);

    /* Colors - State */
    --color-success: hsl(145, 65%, 50%);
    --color-warning: hsl(38, 92%, 55%);
    --color-error: hsl(0, 75%, 60%);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --gradient-card: linear-gradient(180deg, hsla(245, 85%, 60%, 0.1) 0%, transparent 100%);
    --gradient-ai: linear-gradient(45deg, hsl(280, 85%, 65%), hsl(330, 85%, 65%));

    /* Semantic White (for text on dark/colored backgrounds) */
    --color-white: hsl(0, 0%, 100%);
    --color-black: hsl(0, 0%, 0%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Outfit', var(--font-sans);
    --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Font Sizes - clamped for responsive scaling */
    --text-sm: clamp(0.8rem, 0.17vw + 0.76rem, 0.89rem);
    --text-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem);
    --text-lg: clamp(1.25rem, 0.61vw + 1.1rem, 1.58rem);
    --text-xl: clamp(1.56rem, 1vw + 1.31rem, 2.11rem);
    --text-2xl: clamp(1.95rem, 1.56vw + 1.56rem, 2.81rem);
    --text-3xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
    --text-4xl: clamp(3.05rem, 3.54vw + 2.17rem, 5rem);
    --text-5xl: clamp(3.81rem, 5.18vw + 2.52rem, 6.66rem);

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

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* 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-glow: 0 0 20px var(--color-primary-glow);

    /* Glassmorphism */
    --glass-bg: hsla(228, 25%, 16%, 0.6);
    --glass-border: 1px solid hsla(0, 0%, 100%, 0.1);
    --glass-blur: blur(12px);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.26, 1.55);

    /* Z-Index */
    --z-negative: -1;
    --z-elevated: 1;
    --z-sticky: 100;
    --z-drawer: 200;
    --z-modal: 300;
    --z-popover: 400;
    --z-toast: 500;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

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

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

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

/* Scrollbar (Webkit) */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-surface);
}
::-webkit-scrollbar-thumb {
    background-color: var(--color-surface-border);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-surface);
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-primary-dark);
}

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

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-4);
}

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

.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
}
.badge--ai {
    background: var(--gradient-ai);
    color: var(--color-white);
}
.badge--new {
    background: var(--color-secondary);
    color: var(--color-white);
}
.badge--popular {
    background: var(--color-warning);
    color: #000;
}
.badge--pro {
    background: var(--color-primary);
    color: var(--color-white);
}
.badge--free {
    background: var(--color-success);
    color: var(--color-white);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 hsla(245, 85%, 60%, 0.4); }
    70% { box-shadow: 0 0 0 10px hsla(245, 85%, 60%, 0); }
    100% { box-shadow: 0 0 0 0 hsla(245, 85%, 60%, 0); }
}

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

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    body {
        background: var(--color-white);
        color: var(--color-black);
    }
    .glass-card, .btn, header, footer, .ad-slot {
        display: none !important;
    }
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
}
