/* ============================================
   HappyMindsAI - Enterprise CSS Framework
   Production-Ready Stylesheet
   ============================================ */

/* ============================================
   CSS Variables & Design Tokens
   ============================================ */
:root {
    /* Primary Brand Colors - Enterprise Purple Palette */
    --color-primary: #2A163E;
    --color-primary-light: #362358;
    --color-primary-dark: #1A0D28;

    /* Accent Colors */
    --color-accent-gold: #FBC02D;
    --color-accent-teal: #00A896;
    --color-accent-blue: #1B6AA8;
    --color-accent-purple: #7B52AB;

    /* Neutral Colors */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;

    /* Typography */
    --font-primary: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Inter', 'Segoe UI', sans-serif;

    /* Font Sizes */
    --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;

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

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Container */
    --container-max: 1280px;
    --container-padding: 2rem;
}

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

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

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-gray-800);
    background-color: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

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

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

a:hover {
    color: var(--color-accent-teal);
}

/* ============================================
   Layout Components
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(42, 22, 62, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(42, 22, 62, 0.98);
    box-shadow: var(--shadow-lg);
}

.header-top {
    background: var(--color-primary-dark);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-gray-300);
}

.header-contact {
    display: flex;
    gap: var(--space-6);
}

.header-contact a {
    color: var(--color-gray-300);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-contact a:hover {
    color: var(--color-accent-gold);
}

.header-main {
    padding: var(--space-4) 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-teal));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text .sub {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-accent-gold);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-8);
    align-items: center;
    margin: 0;
}

.nav a {
    color: var(--color-white);
    font-weight: 500;
    font-size: var(--text-base);
    padding: var(--space-2) 0;
    position: relative;
    transition: color var(--transition-base);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-gold);
    transition: width var(--transition-base);
}

.nav a:hover,
.nav a.active {
    color: var(--color-accent-gold);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.header-cta {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    margin: 0;
}

.header-cta .btn {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: var(--text-2xl);
    cursor: pointer;
    padding: var(--space-2);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
    padding-top: 120px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(251, 192, 45, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 168, 150, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--color-white);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-6);
    animation: fadeInUp 0.6s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: var(--space-6);
    line-height: 1.1;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero h1 .highlight {
    background: linear-gradient(90deg, var(--color-accent-gold), var(--color-accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-12);
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-8);
    padding-top: var(--space-12);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: var(--text-5xl);
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: var(--space-2);
}

.hero-stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-base);
    font-weight: 500;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent-gold);
    color: var(--color-primary);
    border-color: var(--color-accent-gold);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

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

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

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-16);
}

.section-badge {
    display: inline-block;
    padding: var(--space-2) var(--space-5);
    background: rgba(42, 22, 62, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--color-gray-600);
    line-height: 1.8;
}

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

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

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

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

/* ============================================
   Cards
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

.card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent-gold), var(--color-accent-teal));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

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

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-3xl);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.card-description {
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-5);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-accent-blue);
    font-weight: 600;
    transition: gap var(--transition-base);
}

.card-link:hover {
    gap: var(--space-3);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding-top: var(--space-20);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-12);
    padding-bottom: var(--space-12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
    color: var(--color-accent-gold);
    font-size: var(--text-lg);
    margin-bottom: var(--space-5);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-3);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--color-accent-gold);
}

.footer-bottom {
    padding: var(--space-8) 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --container-padding: 1.5rem;
    }

    .nav ul {
        gap: var(--space-5);
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

    .header-top {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--color-primary);
        padding: var(--space-8);
        transform: translateY(-100%);
        transition: transform var(--transition-base);
        box-shadow: var(--shadow-xl);
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav ul {
        flex-direction: column;
        gap: var(--space-4);
        align-items: flex-start;
    }

    .header-cta {
        flex-direction: column;
        width: 100%;
        margin-top: var(--space-4);
    }

    .hero {
        min-height: auto;
        padding: var(--space-24) 0 var(--space-16);
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ============================================
   Careers Page Styles
   ============================================ */
.job-openings {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-8) 0;
}

.job-openings h2 {
    text-align: center;
    font-size: var(--text-3xl);
    margin-bottom: var(--space-6);
    color: var(--color-primary);
}

/* ============================================
   Technology Stack Styles
   ============================================ */
.tech-section {
    background: linear-gradient(180deg, rgba(42,22,62,0.02), rgba(251,251,253,0.02));
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-8);
    align-items: start;
}

/* Horizontal card grid for Technology Stack */
.card-grid-horizontal {
    display: flex;
    gap: var(--space-8);
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
}

.card-grid-horizontal .card {
    min-width: 220px;
    max-width: 320px;
    flex: 1 1 260px;
}

.tech-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.tech-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2xl);
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
    display: inline-block;
}

.tech-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.tech-list {
    color: var(--color-gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    list-style: disc;
    padding-left: 1.25rem;
    text-align: left;
}

.tech-list li {
    margin-bottom: 0.5rem;
}

/* Screen-reader only */
.sr-only {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .tech-grid { gap: var(--space-6); }
    .tech-item { padding: var(--space-4); }
}

.job-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
    align-items: stretch;
}

.job-card {
    background: linear-gradient(180deg, var(--color-white), #fbfbfd);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.job-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
    color: var(--color-primary);
}

.job-card p { color: var(--color-gray-600); margin-bottom: var(--space-3); }

.job-card .meta {
    color: var(--color-gray-500);
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.job-card a.apply-btn {
    display: inline-block;
    margin-top: var(--space-4);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--color-accent-teal), var(--color-accent-blue));
    color: white;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}

@media (max-width: 768px) {
    .job-openings { padding: var(--space-6) 0; }
    .job-cards { grid-template-columns: 1fr; }
}
