/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Colors - ICD Brand Palette */
    --clr-primary: #662D91;
    /* Deep Purple */
    --clr-primary-dark: #4e2270;
    /* Darker Purple for hover states */
    --clr-secondary: #000000;
    /* Black */
    --clr-accent: #C6B7DD;
    /* Light Purple Accent */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--clr-primary), #8b5cf6);

    /* Backgrounds */
    --bg-main: #f8fafc;
    --bg-surface: #FFFFFF;
    --bg-dark: #000000;

    /* Text */
    --text-main: #334155;
    --text-heading: #000000;
    --text-light: #64748b;

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: var(--space-8);
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Components -> Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(102, 45, 145, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 45, 145, 0.23);
}

.btn-secondary {
    background: var(--clr-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--bg-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-heading);
    border: 2px solid #e2e8f0;
}

.btn-outline:hover {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--clr-primary);
    font-weight: 600;
    margin-top: var(--space-4);
}

.link-arrow:hover {
    color: var(--clr-primary-dark);
    gap: 4px;
}

/* ==========================================================================
   Layout -> Header & Nav
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo img {
    height: 40px;
    /* Default height for large screens */
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:not(.btn):hover,
.nav-links a.active:not(.btn) {
    color: var(--clr-primary);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-smooth);
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active:not(.btn)::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-heading);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* ==========================================================================
   Sections & Grids
   ========================================================================== */
.section {
    padding: var(--space-16) 0;
}

.section-light {
    background-color: var(--bg-surface);
}

.section-header {
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
}

.section-text {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: var(--space-8);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding-top: 140px;
    padding-bottom: var(--space-16);
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--clr-primary);
}

.shape-2 {
    bottom: 10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--clr-accent);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(102, 45, 145, 0.1);
    color: var(--clr-primary);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--space-6);
    border: 1px solid rgba(102, 45, 145, 0.2);
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-6);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: var(--space-8);
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
}

.hero-visual {
    position: relative;
    height: 500px;
    width: 100%;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background: url('../images/hero.png') center/cover no-repeat;
    border-radius: 2rem;
    position: relative;
    border: 8px solid white;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-glass);
}

.stat-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.stat-top {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.stat-bottom {
    bottom: 10%;
    right: -10%;
    animation-delay: 3s;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--clr-primary);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ==========================================================================
   Cards Structure
   ========================================================================== */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    border: 1px solid #f1f5f9;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 220px;
    width: 100%;
    background-color: #e2e8f0;
}

.placeholder-img {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
}

.placeholder-img.placeholder-2 {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    opacity: 0.8;
}

.placeholder-img.placeholder-3 {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    opacity: 0.8;
}

.card-body {
    padding: var(--space-6);
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    color: var(--clr-primary-dark);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.card-body h3 {
    margin-bottom: var(--space-2);
    font-size: 1.25rem;
}

.card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: var(--space-4);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-dark);
    color: #e2e8f0;
    padding-top: var(--space-16);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.footer-brand p {
    margin-top: var(--space-4);
    color: #94a3b8;
    max-width: 300px;
}

.footer-logo {
    color: white;
}

.footer-logo .logo-icon {
    background: white;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    margin-bottom: var(--space-6);
    font-size: 1.125rem;
}

.footer-links ul li {
    margin-bottom: var(--space-2);
}

.footer-links ul li a {
    color: #94a3b8;
}

.footer-links ul li a:hover {
    color: white;
}

.footer-contact p {
    color: #94a3b8;
    margin-bottom: var(--space-2);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-6) 0;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-container {
        gap: var(--space-8);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        margin-top: var(--space-8);
    }

    .stat-card {
        display: none;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .brand-logo img {
        height: 32px;
        /* Smaller height for mobile/tablets */
    }

    .footer-brand p {
        margin: 1rem auto;
    }
}