/*
 * Samsung Ultra-Modern Design System
 * Main CSS - Design tokens, base styles, utilities
 */

/* ===================================
   CSS Custom Properties (Design Tokens)
   Samsung Official Style
   =================================== */
:root {
    /* Samsung Brand Colors */
    --samsung-blue: #1428A0;
    --samsung-blue-dark: #0A1E5A;
    --samsung-blue-light: #2E5CCC;

    /* Neutral Colors */
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray-100: #F8F8F8;
    --color-gray-200: #F4F4F4;
    --color-gray-300: #E5E5E5;
    --color-gray-400: #D1D1D1;
    --color-gray-500: #9E9E9E;
    --color-gray-600: #767676;
    --color-gray-700: #545454;
    --color-gray-800: #333333;
    --color-gray-900: #1A1A1A;

    /* Background Colors */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F8F8F8;
    --color-bg-dark: #000000;
    --color-bg-gray: #F4F4F4;

    /* Text Colors */
    --color-text-primary: #000000;
    --color-text-secondary: #545454;
    --color-text-muted: #767676;
    --color-text-white: #FFFFFF;

    /* Accent Colors */
    --color-accent-blue: #1428A0;
    --color-accent-hover: #0A1E5A;

    /* Shadows (Samsung Style - subtle) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Typography - Samsung Fonts */
    --font-samsung: 'SamsungOne', 'SamsungSharp', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'SamsungSharp', var(--font-samsung);
    --font-body: 'SamsungOne', var(--font-samsung);

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* ===================================
   CSS Reset & Base Styles
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    overflow-x: hidden;
    position: relative;
}

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

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

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

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

a:hover {
    color: var(--samsung-blue);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   Layout Utilities
   =================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

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

.section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ===================================
   Glassmorphism System
   =================================== */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--transition-slow);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px 0 rgba(31, 38, 135, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.glass-card:hover::before {
    left: 100%;
}

/* ===================================
   Typography Utilities
   =================================== */
.text-gradient {
    color: var(--samsung-blue);
}

.text-gradient-hero {
    color: var(--color-black);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* ===================================
   Spacing Utilities
   =================================== */
.m-0 { margin: 0; }
.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); }
.mt-2xl { margin-top: var(--space-2xl); }

.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); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* ===================================
   Display Utilities
   =================================== */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* ===================================
   Position Utilities
   =================================== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ===================================
   Responsive Breakpoints
   =================================== */
@media (max-width: 1024px) {
    :root {
        --text-6xl: 3rem;
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
    }

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

    .section {
        padding: var(--space-3xl) 0;
    }
}

@media (max-width: 768px) {
    :root {
        --text-6xl: 2.5rem;
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --space-4xl: 3rem;
    }

    .container,
    .container-fluid {
        padding: 0 var(--space-md);
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-4xl); }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .glass-card {
        padding: var(--space-lg);
    }
}

/* ===================================
   Animations Base
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.animate-fadeIn {
    animation: fadeIn var(--transition-base) ease-out;
}

.animate-slideUp {
    animation: slideUp var(--transition-slow) ease-out;
}

/* ===================================
   Accessibility
   =================================== */
.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;
}

:focus-visible {
    outline: 2px solid var(--color-neon-blue);
    outline-offset: 2px;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    body {
        background: white;
        color: black;
    }

    .no-print {
        display: none !important;
    }
}
