/**
 * Lorenz Theme CSS
 * Stile condiviso basato sulla landing page Lorenz
 * Colori, font, border-radius e shadow uniformi
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* CSS Variables - Lorenz Palette */
:root {
    /* Colori principali */
    --background: hsl(40, 33%, 95%);
    --background-rgb: 245, 241, 233;
    --foreground: hsl(0, 0%, 10%);
    --foreground-rgb: 26, 26, 26;
    
    /* Card e elementi scuri */
    --card: hsl(0, 0%, 10%);
    --card-foreground: hsl(0, 0%, 100%);
    
    /* Colore primario (arancione caldo) */
    --primary: #F2A541;
    --primary-hover: #e89a35;
    --primary-light: rgba(242, 165, 65, 0.2);
    --primary-foreground: hsl(0, 0%, 10%);
    
    /* Muted e border */
    --muted: hsl(40, 15%, 88%);
    --muted-foreground: hsl(0, 0%, 35%);
    --border: hsl(40, 20%, 85%);
    
    /* Gradienti */
    --gradient-hero: linear-gradient(180deg, #FFF5DE 0%, #FCE4B4 50%, #F6D891 100%);
    --gradient-primary: linear-gradient(135deg, #F2A541 0%, #e89a35 100%);
    
    /* Font */
    --font-display: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px -8px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Colori semantici (invariati) */
    --success: #28a745;
    --success-bg: #d4edda;
    --success-border: #28a745;
    --success-text: #155724;
    
    --warning: #ffc107;
    --warning-bg: #fff3cd;
    --warning-border: #ffc107;
    --warning-text: #856404;
    
    --error: #dc3545;
    --error-bg: #f8d7da;
    --error-border: #dc3545;
    --error-text: #721c24;
    
    --info: #17a2b8;
    --info-bg: #d1ecf1;
    --info-border: #17a2b8;
    --info-text: #0c5460;
}

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

/* Tipografia base */
body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--foreground);
}

/* Link base */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Stili form base */
input, textarea, select {
    font-family: var(--font-body);
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    background: white;
    color: var(--foreground);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

input::placeholder, textarea::placeholder {
    color: var(--muted-foreground);
}

/* Classi Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(242, 165, 65, 0.3);
}

.btn-dark {
    background-color: var(--card);
    color: var(--card-foreground);
}

.btn-dark:hover:not(:disabled) {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
    background: var(--foreground);
    color: white;
    border-color: var(--foreground);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--muted);
    color: var(--foreground);
}

/* Card base */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.card-dark {
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-dark {
    background: var(--card);
    color: var(--card-foreground);
}

/* Status boxes (semantici - invariati) */
.status-success {
    background: var(--success-bg);
    border-left: 4px solid var(--success-border);
    color: var(--success-text);
}

.status-warning {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning-border);
    color: var(--warning-text);
}

.status-error {
    background: var(--error-bg);
    border-left: 4px solid var(--error-border);
    color: var(--error-text);
}

.status-info {
    background: var(--info-bg);
    border-left: 4px solid var(--info-border);
    color: var(--info-text);
}

/* Info box (stile Lorenz) */
.info-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--foreground);
}

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

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--foreground);
}
