/* ============================================
   ChestUp Design System 2025
   Enterprise-Level Design Tokens
   ============================================ */

/* ========== Design Tokens ========== */
:root {
    /* === Color System: Titanium Dark === */
    /* Primary Accents - Electric & Sophisticated */
    --color-primary-purple: hsl(260, 100%, 65%);
    /* Electric Violet */
    --color-primary-pink: hsl(330, 100%, 60%);
    /* Hot Pink (Secondary Glow) */
    --color-accent-amber: hsl(40, 100%, 55%);
    /* Golden Signal */
    --color-accent-blue: hsl(210, 100%, 60%);
    /* Titanium Blue */

    /* Neutral Palette (Void & Titanium) */
    --color-neutral-950: #000000;
    /* Pure Void */
    --color-neutral-900: #050507;
    /* Deep Space */
    --color-neutral-800: #0F0F12;
    /* Dark Metal */
    --color-neutral-700: #1C1C21;
    /* Gunmetal */
    --color-neutral-600: #3F3F46;
    /* Graphite */
    --color-neutral-500: #71717A;
    /* Steel */
    --color-neutral-400: #A1A1AA;
    /* Silver */
    --color-neutral-300: #D4D4D8;
    /* Platinum */
    --color-neutral-200: #E4E4E7;
    /* Cloud */
    --color-neutral-100: #F4F4F5;
    /* Mist */
    --color-neutral-50: #FFFFFF;
    /* White Light */

    /* Semantic Colors */
    --color-success: hsl(150, 100%, 40%);
    --color-warning: hsl(40, 100%, 50%);
    --color-error: hsl(0, 100%, 60%);
    --color-info: hsl(210, 100%, 60%);

    /* Gradients - Cinematic */
    --gradient-primary: linear-gradient(135deg, #A78BFA 0%, #F472B6 100%);
    --gradient-hero: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(161, 161, 170, 1) 100%);
    /* Text Gradient */
    --gradient-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(139, 92, 246, 0.3) 0%, transparent 70%);

    /* === Typography === */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Scaled for Impact (Desktop First) */
    --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: 2rem;
    --text-4xl: 3rem;
    --text-5xl: 4rem;
    --text-6xl: 5rem;
    --text-7xl: 6rem;
    --text-8xl: 8rem;
    /* Massive Hero */

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

    /* Tracking (Tighter for Headers) */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.03em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;

    /* === Spacing === */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

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

    /* === Shadows & Glows === */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);
    /* === Animation === */
    /* Durations */
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;

    /* Easing Functions */
    --ease-linear: linear;
    --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.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);

    /* === Z-Index Scale === */
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1100;
    --z-fixed: 1200;
    --z-modal-backdrop: 1300;
    --z-modal: 1400;
    --z-popover: 1500;
    --z-tooltip: 1600;

    /* === Layout === */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1400px;
    --container-max: 1600px;

    /* === Breakpoints (for reference) === */
    --bp-sm: 640px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;
    --bp-2xl: 1536px;
}

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

html {
    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: var(--leading-normal);
    color: var(--color-neutral-50);
    background-color: var(--color-neutral-950);
    overflow-x: hidden;
}

/* ========== Typography Base ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

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 {
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

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

/* ========== Utility Classes ========== */

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-2xl);
    margin-inline: auto;
    padding-inline: var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding-inline: var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-inline: var(--space-8);
    }
}

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

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* Flex 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-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

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

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

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

/* ========== Animation Utilities ========== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s var(--ease-out) forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s var(--ease-out) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s var(--ease-out) forwards;
}

.animate-float {
    animation: float 4s var(--ease-in-out) infinite;
}

.animate-glow {
    animation: glow 3s var(--ease-in-out) infinite;
}

/* Scroll Animation Delays */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

/* ========== Component Base Styles ========== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
    white-space: nowrap;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-700);
}

.btn-secondary:hover {
    border-color: var(--color-neutral-500);
    background: var(--color-neutral-900);
}

.btn-lg {
    padding: var(--space-5) var(--space-8);
    font-size: var(--text-lg);
}

/* Cards */
.card {
    background: var(--color-neutral-900);
    border: 1px solid var(--color-neutral-800);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    transition: all var(--duration-base) var(--ease-out);
}

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

.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section Spacing */
.section {
    padding-block: var(--space-16);
}

@media (min-width: 768px) {
    .section {
        padding-block: var(--space-20);
    }
}

@media (min-width: 1024px) {
    .section {
        padding-block: var(--space-24);
    }
}

/* Responsive Display */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .show-mobile {
        display: none !important;
    }
}