/* ============================================
   LEGACY STYLES - IMI LIFE SCIENCE
   Imported from mockup/css to support unmigrated blocks.
   ============================================ */

/* VARIABLES — delegated to --theme-* custom properties set by the theme manager.
   These legacy aliases are kept for backward-compatibility with unmigrated blocks.
   Each falls back to the corresponding @theme fallback so first-paint is correct. */
:root {
    /* IMI Brand Colors */
    --purple: var(--theme-primary-dark, #512D6D);
    --jet-black: var(--theme-text, #2B2A27);
    --stone5: var(--theme-surface-2, #EAE5E1);
    --stone10: var(--theme-surface-1, #E3DDD4);
    --teal: var(--theme-accent, #1F607C);
    --gold: var(--theme-palette-gold, #f7c631);
    --coral: var(--theme-palette-coral, #e34f6d);

    /* Neutral Colors */
    --white: var(--theme-white, #ffffff);
    --light-gray: var(--theme-surface-4, #F5F6F5);
    --medium-gray: var(--theme-text-muted, #4a5568);
    --dark-gray: var(--theme-text, #2B2A27);

    /* Typography */
    --font-primary: museo-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Spacing */
    --container-max: 1400px;
    --container-padding: 2rem;

    /* Transitions */
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* HERO SECTION WITH SLIDER */
.hero-section {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--jet-black);
}

.hero-slider {
    position: relative;
    height: 100%;
    width: 100%;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.hero-bg.active {
    opacity: 1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, color-mix(in srgb, var(--theme-text) 60%, transparent), color-mix(in srgb, var(--theme-text) 20%, transparent));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Adjust container specifically for hero to match legacy behavior if needed,
   but try to rely on Tailwind's container if possible.
   Here we enforce legacy centering. */
.hero-content .container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.hero-text-container {
    max-width: 650px;
    color: white;
}

.hero-headline {
    font-size: var(--typo-display-title-size);
    font-weight: var(--typo-display-title-weight);
    margin-bottom: 1.5rem;
    line-height: var(--typo-display-title-lh);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-subheadline {
    font-size: var(--typo-body-text-size);
    line-height: var(--typo-body-text-lh);
    font-weight: var(--typo-body-text-weight);
    opacity: 0;
    color: white;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

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

.hero-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-arrow {
    background: color-mix(in srgb, var(--theme-white) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-white) 30%, transparent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--typo-button-text-large-size);
    padding-bottom: 4px; /* Adjustment for character alignment */
}

.hero-arrow:hover {
    background: white;
    color: var(--purple);
}

.hero-dots {
    display: flex;
    gap: 0.5rem;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--theme-white) 30%, transparent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: white;
    transform: scale(1.2);
}


/* FEATURE GRID */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 8px;
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-text) 10%, transparent);
}

.feature-card h3 {
    font-size: var(--typo-card-title-size);
    font-weight: var(--typo-card-title-weight);
    color: var(--purple);
    margin-bottom: 1rem;
}

.feature-card p {
    font-size: var(--typo-card-body-size);
    line-height: var(--typo-card-body-lh);
    color: var(--jet-black);
}

/* VALUES GRID */
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
}

.value-card {
    padding: 2rem;
    background: var(--white);
    border: 2px solid var(--stone10);
    border-radius: 8px;
    transition: all var(--transition-base);
}

.value-card:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.value-card h3 {
    font-size: var(--typo-card-title-size);
    font-weight: var(--typo-card-title-weight);
    color: var(--purple);
    margin-bottom: 1rem;
}

.value-card p {
    font-size: var(--typo-card-body-size);
    line-height: var(--typo-card-body-lh);
}

/* CTA SECTION */
.cta-section {
    padding: 4rem 0;
    text-align: center;
    background: var(--purple);
    color: white;
}

.cta-section h2 {
    font-size: var(--typo-section-title-size);
    margin-bottom: 1rem;
    color: white; /* Force white override */
}

.cta-section p {
    font-size: var(--typo-body-text-size);
    margin-bottom: 2rem;
    opacity: 0.9;
    color: white; /* Force white override */
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--purple);
    font-weight: var(--typo-button-text-weight);
    border-radius: 4px;
    transition: all var(--transition-base);
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-text) 20%, transparent);
}

/* STATS SECTION */
.stats-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: var(--typo-stat-value-size);
    font-weight: var(--typo-stat-value-weight);
    color: var(--purple);
    line-height: var(--typo-stat-value-lh);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: var(--typo-stat-label-size);
    color: var(--jet-black);
    font-weight: var(--typo-stat-label-weight);
}

/* TIMELINE */
.timeline {
    margin-top: 3rem;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--purple);
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--purple);
}

.timeline-year {
    font-size: var(--typo-list-item-title-size);
    font-weight: var(--typo-list-item-title-weight);
    color: var(--purple);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: var(--typo-list-item-title-size);
    font-weight: var(--typo-list-item-title-weight);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: var(--typo-list-item-body-size);
    color: var(--medium-gray);
}

/* UTILITY HELPERS FROM MOCKUP IF NEEDED */
.btn-primary {
    background-color: var(--purple);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: var(--typo-button-text-weight);
    transition: background-color 0.2s;
    display: inline-block;
    text-decoration: none;
}
.btn-primary:hover {
    background-color: var(--theme-primary-dark, #512D6D);
}

/* Fix Hero image paths */
/* The background images in the HTML are like 'images/hero/slide1.webp' */
/* These paths are relative. In a React app, they need to be in public/ or imported. */
/* If the images are in public/images/hero, then 'images/hero/slide1.webp' is correct relative to root. */
/* Assuming 'mockup/images' content has been copied to 'apps/web-storefront/public/images' */
