/*
 * Klenella - Love Message Platform
 * Custom Design System - Avoiding generic AI aesthetics
 * Using: Crimson Pro for headings, DM Sans for body
 */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@300;400;600;700&family=DM+Sans:wght@400;500;700&display=swap');

:root {
    /* Unique Color Palette - Deep Rose & Midnight Blue */
    --primary: #C84B31;
    --primary-dark: #9A3123;
    --primary-light: #E97560;
    --secondary: #2D3561;
    --secondary-dark: #1A1F3A;
    --secondary-light: #3F4A7C;

    /* Accents */
    --accent-gold: #D4AF37;
    --accent-teal: #2A9D8F;
    --accent-coral: #FF6B6B;

    /* Neutrals */
    --white: #FEFEFE;
    --off-white: #F8F7F5;
    --gray-100: #E8E5E1;
    --gray-200: #CDC9C3;
    --gray-300: #9B9791;
    --gray-400: #6B6560;
    --gray-500: #3D3935;
    --black: #1A1614;

    /* Typography */
    --font-display: 'Crimson Pro', serif;
    --font-body: 'DM Sans', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(200, 75, 49, 0.08);
    --shadow-md: 0 4px 16px rgba(200, 75, 49, 0.12);
    --shadow-lg: 0 8px 32px rgba(200, 75, 49, 0.16);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-500);
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Atmospheric Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 50%, rgba(200, 75, 49, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(45, 53, 97, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 40%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-dark);
    margin-bottom: var(--space-sm);
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.75rem; letter-spacing: -0.01em; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--space-sm);
}

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

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

/* Container & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

/* Header/Navigation */
.header {
    background: rgba(254, 254, 254, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-link {
    font-weight: 500;
    color: var(--gray-400);
    padding: var(--space-xs) 0;
    position: relative;
    transition: color var(--transition-base);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

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

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    color: var(--white);
}

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

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

.btn-ghost {
    background: transparent;
    color: var(--gray-400);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-500);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    animation: fadeInUp 0.6s ease;
}

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

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--gray-100);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    color: var(--gray-300);
    font-size: 0.875rem;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gray-500);
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(200, 75, 49, 0.1);
}

.form-control::placeholder {
    color: var(--gray-300);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    font-size: 0.875rem;
    color: var(--gray-300);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--accent-coral);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Stats/Metrics */
.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary { background: var(--primary); color: var(--white); }
.badge-success { background: var(--accent-teal); color: var(--white); }
.badge-warning { background: var(--accent-gold); color: var(--secondary-dark); }
.badge-danger { background: var(--accent-coral); color: var(--white); }

/* Alerts */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success { background: rgba(42, 157, 143, 0.1); color: var(--accent-teal); border-left: 4px solid var(--accent-teal); }
.alert-error { background: rgba(255, 107, 107, 0.1); color: var(--accent-coral); border-left: 4px solid var(--accent-coral); }
.alert-info { background: rgba(45, 53, 97, 0.1); color: var(--secondary); border-left: 4px solid var(--secondary); }

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-300); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .nav-menu {
        flex-direction: column;
        gap: var(--space-sm);
    }
}
