/**
 * Dentalvarehuset Design System
 * Global typography, colors, and spacing standards
 *
 * Brand: "The Pink Company" - rgb(204, 0, 98)
 * Last Updated: 2026-02-28
 */

/* ============================================
   CSS CUSTOM PROPERTIES - BRAND COLORS
   ============================================ */
:root {
    /* Primary Brand Colors */
    --color-brand-primary: rgb(204, 0, 98);
    --color-brand-primary-hover: rgb(180, 0, 80);
    --color-brand-primary-light: rgba(204, 0, 98, 0.1);
    --color-brand-primary-lighter: rgba(204, 0, 98, 0.05);

    /* Brand Gradients */
    --gradient-brand: linear-gradient(135deg, rgb(204, 0, 98) 0%, rgb(180, 0, 80) 100%);
    --gradient-brand-subtle: linear-gradient(135deg, rgba(204, 0, 98, 0.1) 0%, rgba(180, 0, 80, 0.05) 100%);
    --gradient-brand-pink: linear-gradient(135deg, rgb(236, 72, 153) 0%, rgb(244, 114, 182) 100%);

    /* Neutral Colors - Gray Scale */
    --color-gray-50: rgb(249, 250, 251);
    --color-gray-100: rgb(243, 244, 246);
    --color-gray-200: rgb(229, 231, 235);
    --color-gray-300: rgb(209, 213, 219);
    --color-gray-400: rgb(156, 163, 175);
    --color-gray-500: rgb(107, 114, 128);
    --color-gray-600: rgb(75, 85, 99);
    --color-gray-700: rgb(55, 65, 81);
    --color-gray-800: rgb(31, 41, 55);
    --color-gray-900: rgb(17, 24, 39);

    /* Semantic Colors */
    --color-success: rgb(34, 197, 94);
    --color-success-bg: rgba(34, 197, 94, 0.1);
    --color-warning: rgb(251, 191, 36);
    --color-warning-bg: rgba(251, 191, 36, 0.1);
    --color-error: rgb(239, 68, 68);
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-info: rgb(59, 130, 246);
    --color-info-bg: rgba(59, 130, 246, 0.1);

    /* Background Colors */
    --color-bg-primary: rgb(255, 255, 255);
    --color-bg-secondary: rgb(249, 250, 251);
    --color-bg-tertiary: rgb(243, 244, 246);

    /* Text Colors - WCAG AA Compliant */
    --color-text-primary: rgb(17, 24, 39);    /* 16.1:1 contrast on white */
    --color-text-secondary: rgb(55, 65, 81);  /* 9.5:1 contrast on white */
    --color-text-tertiary: rgb(107, 114, 128); /* 4.6:1 contrast on white */
    --color-text-inverse: rgb(255, 255, 255); /* For use on dark backgrounds */

    /* Border Colors */
    --color-border-light: rgb(229, 231, 235);
    --color-border-medium: rgb(209, 213, 219);
    --color-border-brand: rgb(204, 0, 98);
}

/* ============================================
   TYPOGRAPHY SYSTEM
   ============================================ */
:root {
    /* Font Families */
    --font-family-display: 'EB Garamond', Georgia, serif;
    --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;

    /* Font Sizes - Modular Scale (1.25) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px - body text minimum */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    --text-7xl: 4.5rem;      /* 72px */

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;      /* Body text standard */
    --leading-relaxed: 1.625;   /* For longer text blocks */
    --leading-loose: 2;

    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
}

/* Typography Utility Classes */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

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

@media (min-width: 1024px) {
    h1 { font-size: var(--text-6xl); }
    h2 { font-size: var(--text-5xl); }
    h3 { font-size: var(--text-4xl); }
}

p {
    font-family: var(--font-family-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-secondary);
}

/* ============================================
   SPACING SYSTEM
   ============================================ */
:root {
    /* Base Unit: 4px */
    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */
}

/* Section Padding Standards */
.section-py-sm { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.section-py-md { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.section-py-lg { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.section-py-xl { padding-top: var(--space-24); padding-bottom: var(--space-24); }

/* Container Spacing Standards */
.gap-sm { gap: var(--space-4); }
.gap-md { gap: var(--space-6); }
.gap-lg { gap: var(--space-8); }
.gap-xl { gap: var(--space-10); }

/* Card Padding Standards */
.card-p-sm { padding: var(--space-4); }
.card-p-md { padding: var(--space-6); }
.card-p-lg { padding: var(--space-8); }

/* ============================================
   BORDER RADIUS SYSTEM
   ============================================ */
:root {
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-3xl: 2rem;     /* 32px */
    --radius-full: 9999px;
}

/* ============================================
   SHADOW SYSTEM
   ============================================ */
:root {
    --shadow-sm: 0 1px 2px 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-brand: 0 10px 15px -3px rgba(204, 0, 98, 0.2), 0 4px 6px -2px rgba(204, 0, 98, 0.1);
}

/* ============================================
   TRANSITION SYSTEM
   ============================================ */
:root {
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;

    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);
}

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

/* Text Styles */
.text-brand { color: var(--color-brand-primary); }
.text-brand-hover:hover { color: var(--color-brand-primary); }
.text-muted { color: var(--color-text-tertiary); }
.text-small { font-size: var(--text-sm); }
.text-lead { font-size: var(--text-lg); line-height: var(--leading-relaxed); }

/* Backgrounds */
.bg-brand { background-color: var(--color-brand-primary); }
.bg-brand-light { background-color: var(--color-brand-primary-light); }
.bg-secondary { background-color: var(--color-bg-secondary); }

/* Gradients */
.bg-gradient-brand { background: var(--gradient-brand); }
.bg-gradient-brand-subtle { background: var(--gradient-brand-subtle); }

/* Borders */
.border-brand { border-color: var(--color-brand-primary); }
.border-light { border-color: var(--color-border-light); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal) var(--ease-default);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-brand);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background-color: var(--color-bg-primary);
    color: var(--color-brand-primary);
    border: 2px solid var(--color-brand-primary);
}

.btn-secondary:hover {
    background-color: var(--color-brand-primary-light);
}

/* Cards */
.card {
    background-color: var(--color-bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal) var(--ease-default);
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
}

.badge-brand {
    background-color: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

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

/* ============================================
   ACCESSIBILITY - WCAG AA
   ============================================ */

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Skip Link for Keyboard Navigation */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-brand-primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    z-index: 10000;
}

.skip-link:focus {
    top: 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;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-border-light: rgb(0, 0, 0);
        --color-border-medium: rgb(0, 0, 0);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .no-print { display: none !important; }
    a[href]:after { content: " (" attr(href) ")"; }
    abbr[title]:after { content: " (" attr(title) ")"; }
}
