/**
 * WINTERRÄTSEL HALDENSLEBEN 2025 - THEME
 * 
 * Winter-Theme mit Navy/Gold Farbschema
 * Inspiriert von Tailwind CSS v4 @theme
 */

/* ===================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =================================== */

:root {
    /* ===== COLOR PALETTE ===== */
    
    /* Primary - Deep Winter Navy */
    --color-primary: #0f274d;
    --color-primary-foreground: #ffffff;
    --color-primary-rgb: 15, 39, 77;
    
    /* Accent - Warm Gold */
    --color-accent: #d4a574;
    --color-accent-foreground: #0f274d;
    --color-accent-rgb: 212, 165, 116;
    
    /* Secondary - Light Navy Gray */
    --color-secondary: #8b9dc3;
    --color-secondary-foreground: #0f274d;
    
    /* Background & Foreground */
    --color-background: #ffffff;
    --color-foreground: #0f274d;
    --color-background-rgb: 255, 255, 255;
    
    /* Card */
    --color-card: #ffffff;
    --color-card-foreground: #0f274d;
    
    /* Muted */
    --color-muted: #f1f5f9;
    --color-muted-foreground: #64748b;
    
    /* Destructive - Red */
    --color-destructive: #dc2626;
    --color-destructive-foreground: #ffffff;
    
    /* Success - Green */
    --color-success: #22c55e;
    --color-success-foreground: #ffffff;
    
    /* Warning - Orange */
    --color-warning: #f59e0b;
    --color-warning-foreground: #ffffff;
    
    /* Info - Blue */
    --color-info: #3b82f6;
    --color-info-foreground: #ffffff;
    
    /* Border & Input */
    --color-border: rgba(15, 39, 77, 0.1);
    --color-input: rgba(15, 39, 77, 0.1);
    --color-ring: #d4a574;
    
    /* ===== TYPOGRAPHY ===== */
    
    --font-heading: 'Quicksand', sans-serif;
    --font-sans: 'Poppins', sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Font Sizes */
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    --font-size-5xl: 3rem;        /* 48px */
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* ===== SPACING ===== */
    
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */
    
    /* ===== BORDER RADIUS ===== */
    
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.375rem;   /* 6px */
    --radius-lg: 0.5rem;     /* 8px */
    --radius-xl: 0.75rem;    /* 12px */
    --radius-2xl: 1rem;      /* 16px */
    --radius-full: 9999px;
    --radius: 0.5rem;        /* Default */
    
    /* ===== 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 -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* ===== TRANSITIONS ===== */
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ===== Z-INDEX ===== */
    
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===================================
   DARK MODE
   =================================== */

.dark,
[data-theme="dark"] {
    /* Primary - Lighter Navy for dark mode */
    --color-primary: #4a6fa5;
    --color-primary-foreground: #ffffff;
    --color-primary-rgb: 74, 111, 165;
    
    /* Accent - Keep gold warm */
    --color-accent: #d4a574;
    --color-accent-foreground: #0f274d;
    --color-accent-rgb: 212, 165, 116;
    
    /* Secondary - Darker Navy Gray */
    --color-secondary: #3d4f6f;
    --color-secondary-foreground: #e2e8f0;
    
    /* Background & Foreground - Deep dark blue */
    --color-background: #0a1628;
    --color-foreground: #e2e8f0;
    --color-background-rgb: 10, 22, 40;
    
    /* Card - Slightly lighter than background */
    --color-card: #111e35;
    --color-card-foreground: #e2e8f0;
    
    /* Muted - Mid-tone dark */
    --color-muted: #1e2d45;
    --color-muted-foreground: #94a3b8;
    
    /* Destructive - Brighter red for dark mode */
    --color-destructive: #ef4444;
    --color-destructive-foreground: #ffffff;
    
    /* Success - Brighter green */
    --color-success: #10b981;
    --color-success-foreground: #ffffff;
    
    /* Warning - Keep orange */
    --color-warning: #f59e0b;
    --color-warning-foreground: #ffffff;
    
    /* Info - Keep blue */
    --color-info: #3b82f6;
    --color-info-foreground: #ffffff;
    
    /* Border & Input - Lighter for visibility */
    --color-border: rgba(255, 255, 255, 0.1);
    --color-input: rgba(255, 255, 255, 0.1);
    --color-ring: #d4a574;
    
    /* Shadows - Darker shadows for dark mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

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

* {
    border-color: var(--color-border);
    outline-color: var(--color-ring);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-foreground);
    background-color: var(--color-background);
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-foreground);
    margin: 0;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin: 0;
    line-height: var(--line-height-relaxed);
}

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

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

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

@media (min-width: 640px) {
    .container {
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--spacing-2xl);
        padding-right: var(--spacing-2xl);
    }
}

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font Weights */
.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Colors */
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted-foreground); }

.bg-primary { background-color: var(--color-primary); }
.bg-accent { background-color: var(--color-accent); }
.bg-card { background-color: var(--color-card); }

/* Cursor */
button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
[type="button"]:not(:disabled),
[type="submit"]:not(:disabled),
[type="reset"]:not(:disabled),
a[href],
select:not(:disabled),
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled) {
    cursor: pointer;
}

button:disabled,
[role="button"][aria-disabled="true"],
[type="button"]:disabled,
[type="submit"]:disabled,
[type="reset"]:disabled,
select:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===================================
   WINTER THEME ANIMATIONS
   =================================== */

/* Snowfall Animation */
@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(10vw) rotate(360deg);
        opacity: 0;
    }
}

.snowflake {
    position: absolute;
    top: -10vh;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    animation: snowfall linear infinite;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 1;
}

/* Stagger snowflake animations */
.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 2s; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 4s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 1s; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 3s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 5s; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 2s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 4s; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(10) { left: 5%; animation-duration: 11s; animation-delay: 3s; }

/* Gentle Pulse (for CTAs) */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 165, 116, 0.2) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--color-ring);
    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;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-border: rgba(15, 39, 77, 0.3);
    }
    
    .dark {
        --color-border: rgba(255, 255, 255, 0.3);
    }
}

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

@media print {
    .snowflake,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}
