/*
 * ============================================
 * VIBRANT MINDS TECH — Design System
 * Ultra-Premium Foundation CSS
 * ============================================
 */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* ─── Design Tokens ─── */
:root {
    /* Brand Palette */
    --primary: #1B2A4A;
    --primary-rgb: 27, 42, 74;
    --primary-light: #2D4373;
    --primary-lighter: #3D5A99;
    --primary-dark: #111D35;
    
    --accent: #F26522;
    --accent-rgb: 242, 101, 34;
    --accent-light: #FF7E3D;
    --accent-dark: #D4550E;
    --accent-glow: rgba(242, 101, 34, 0.15);

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8F9FC;
    --gray-100: #F1F3F8;
    --gray-200: #E4E7EF;
    --gray-300: #D1D5E0;
    --gray-400: #9CA3B4;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Surfaces */
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --surface-overlay: rgba(27, 42, 74, 0.6);
    --bg-page: #F8F9FC;
    --bg-section-alt: #F1F3F8;

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font Sizes — Fluid Scale */
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
    --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --text-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.2rem, 1rem + 1vw, 1.5rem);
    --text-2xl: clamp(1.4rem, 1.1rem + 1.5vw, 1.875rem);
    --text-3xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.5rem);
    --text-4xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.25rem);
    --text-5xl: clamp(2.8rem, 1.8rem + 5vw, 4.5rem);

    /* Spacing Scale */
    --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-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

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

    /* Shadows — Layered for depth */
    --shadow-xs: 0 1px 2px rgba(var(--primary-rgb), 0.04);
    --shadow-sm: 0 2px 8px rgba(var(--primary-rgb), 0.06);
    --shadow-md: 0 4px 16px rgba(var(--primary-rgb), 0.08);
    --shadow-lg: 0 8px 32px rgba(var(--primary-rgb), 0.1);
    --shadow-xl: 0 16px 48px rgba(var(--primary-rgb), 0.12);
    --shadow-2xl: 0 24px 64px rgba(var(--primary-rgb), 0.16);
    --shadow-glow: 0 0 40px rgba(var(--accent-rgb), 0.2);
    --shadow-card: 0 2px 12px rgba(var(--primary-rgb), 0.06), 0 0 1px rgba(var(--primary-rgb), 0.08);
    --shadow-card-hover: 0 12px 40px rgba(var(--primary-rgb), 0.12), 0 0 1px rgba(var(--primary-rgb), 0.1);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;

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

    /* Layout */
    --container-max: 1400px;
    --container-narrow: 960px;
    --nav-height: 80px;
}

/* ─── CSS Reset ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

button, input, textarea, select {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
    letter-spacing: -0.02em;
}

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); }

p {
    color: var(--gray-600);
    line-height: 1.8;
}

::selection {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--primary);
}

/* ─── Container System ─── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* ─── Section Spacing ─── */
.section {
    padding: var(--space-24) 0;
    position: relative;
}

.section-alt {
    background-color: var(--bg-section-alt);
}

.section-dark {
    background: var(--primary);
    color: var(--white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--white);
}

.section-dark p {
    color: rgba(255, 255, 255, 0.75);
}

/* ─── Section Headers ─── */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto var(--space-16);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-4);
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.section-title {
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-md);
    color: var(--gray-500);
    max-width: 560px;
    margin: 0 auto;
}

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

.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: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* ─── Flex Utilities ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.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 Utilities ─── */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--gray-500); }
.text-white { color: var(--white); }
.font-heading { font-family: var(--font-primary); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ─── Keyframe Animations ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

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

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

/* ─── Animation Utility Classes ─── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slower) var(--ease-out),
                transform var(--duration-slower) var(--ease-out);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 100ms; }
.animate-on-scroll.delay-2 { transition-delay: 200ms; }
.animate-on-scroll.delay-3 { transition-delay: 300ms; }
.animate-on-scroll.delay-4 { transition-delay: 400ms; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* ─── Responsive Breakpoints Reference ─── */
/* Mobile:  max-width: 480px  */
/* Tablet:  max-width: 768px  */
/* Desktop: max-width: 1024px */
/* Wide:    max-width: 1280px */
