/* Home page specific styles */

/* Hide skip link */
.skip-link,
a.skip-link,
a[href="#main"],
body > a:first-child[href="#main"],
body > .skip-link:first-child {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Hero Section */
.home-hero {
    background: #000000;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Hero background video - positioned behind hero content */
.hero-background-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 0 !important; /* Behind content */
    object-fit: cover !important;
    object-position: center !important;
    pointer-events: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 0; /* Start hidden for fade-in - allow JS to override */
    animation: videoFadeIn 2s ease-in-out forwards;
    background: #000000 !important;
    /* Maintain quality - no blur */
    filter: none !important;
    -webkit-filter: none !important;
    /* No borders */
    border: none !important;
    outline: none !important;
    /* Maintain aspect ratio and quality */
    min-width: 100% !important;
    max-width: 100% !important;
}

/* When video is playing, ensure it's visible */
.hero-background-video.playing {
    opacity: 1 !important;
}

/* Fade-in animation for video */
@keyframes videoFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Dark overlay on video for text readability (40-50% black) */
.hero-video-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important; /* Above video, below text */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.45) 50%,
        rgba(0, 0, 0, 0.6) 85%,
        rgba(0, 0, 0, 0.8) 95%,
        rgba(0, 0, 0, 1) 100%
    ) !important;
    pointer-events: none !important;
}

.home-hero-content {
    position: relative;
    z-index: 2; /* Above video and overlay */
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-24) var(--spacing-6);
}

/* Hero Logo - Above title */
.hero-inline-logo {
    width: 400px; /* Desktop logo size */
    height: auto;
    display: block;
    margin: 0 auto var(--spacing-4) auto; /* Center and add spacing below */
    opacity: 0.95;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.1));
}

.home-hero-title {
    display: block;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-inline-logo {
        width: 200px;
        margin-bottom: var(--spacing-3);
    }
}

@media (max-width: 480px) {
    .hero-inline-logo {
        width: 180px;
        margin-bottom: var(--spacing-2);
    }
}

/* Ensure all hero content is above video */
.home-hero .container,
.home-hero-content,
.home-hero-title,
.home-hero-tagline,
.home-hero-description,
.hero-actions {
    position: relative;
    z-index: 2; /* Above video and overlay */
}

.home-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--spacing-6);
    line-height: 1.2;
}

.home-hero-tagline {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: #ffffff;
    font-weight: 400;
    margin-bottom: var(--spacing-8);
    opacity: 0.9;
}

.home-hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: var(--spacing-12);
    opacity: 0.85;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Fixed Background Image - Above Why CosmosDataSec section */
.fixed-background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    display: block;
    /* Will be positioned by JavaScript based on section position */
}

/* Key Values Section */
.key-values {
    padding: var(--spacing-32) 0;
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 400px; /* Ensure section has height */
}

/* No gap */
.product-preview + .key-values {
    padding-top: 0;
}

/* No dark overlay on key-values by default */
.key-values::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

/* Risk lives section – match body-style text (like CTA / Why this / Built by) */
.risk-lives-section .section-title {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 500;
    line-height: 1.7;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
    opacity: 0.95;
}

.risk-lives-section .container > p.section-description {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    font-weight: 400;
    line-height: 1.65;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.risk-lives-section .container > p.section-description:last-of-type {
    margin-bottom: 0;
}

/* Smooth transition from hero: black gradient at top fading to transparent */
.risk-lives-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.85) 15%,
        rgba(0, 0, 0, 0.6) 35%,
        rgba(0, 0, 0, 0.3) 55%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* Remove shadow – must come after base .key-values::before */
.product-preview + .key-values,
.how-it-works-section,
.risk-lives-section,
.why-cosmos + .key-values {
    background-color: transparent !important;
}

.product-preview + .key-values::before,
.how-it-works-section::before,
.risk-lives-section::before,
.why-cosmos + .key-values::before {
    display: none !important;
}

/* The Solution? section (above How it works) */
.solution-section {
    padding: var(--spacing-24) 0;
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.solution-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

.solution-section-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.solution-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--spacing-6);
}

.solution-section-lead {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-6);
}

.solution-section-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-6);
    max-width: 900px;
    margin: 0 auto;
}

.solution-card {
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(2px);
    padding: var(--spacing-8);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
}

.solution-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
    .solution-section-cards {
        grid-template-columns: 1fr;
    }
}

/* Solution section – better styling for copy */
.solution-copy {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.solution-lead {
    font-size: 1.2rem;
    line-height: 1.75;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 500;
}

.solution-tagline {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.key-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-8);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}

.key-value-card {
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(2px);
    padding: var(--spacing-8);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all var(--transition-normal);
    box-shadow: none;
}

.key-value-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.key-value-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-6);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* How it works – all 4 cards in one row */
.how-it-works-grid {
    grid-template-columns: repeat(4, 1fr);
}

.how-it-works-grid .key-value-icon .step-num {
    font-weight: 700;
}

.key-value-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--spacing-4);
}

.key-value-description {
    color: #ffffff;
    opacity: 0.85;
    line-height: 1.6;
    font-size: var(--font-size-base);
}

/* Product Preview Section */
.product-preview {
    padding: var(--spacing-32) 0;
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 400px; /* Ensure section has height */
}

/* No dark overlay */
.product-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

/* Ensure cards are above background image */
.key-values .container,
.key-values-grid,
.key-value-card,
.product-preview-content,
.preview-grid,
.preview-card {
    position: relative;
    z-index: 2;
}

.product-preview-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    position: relative;
    z-index: 2;
    text-align: center;
}

.product-preview-content .cta-description {
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-8);
}

.product-preview-title {
    font-size: var(--font-size-4xl);
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin-bottom: var(--spacing-12);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-8);
}

.preview-card {
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    transition: all var(--transition-normal);
    text-align: center;
    padding: var(--spacing-8);
    box-shadow: none;
}

.preview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.preview-image {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-6);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-content {
    padding: 0;
}

.preview-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--spacing-4);
}

/* Why CosmosDataSec Section */
.why-cosmos {
    padding: var(--spacing-32) 0;
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 400px; /* Ensure section has height */
}

/* No dark overlay */
.why-cosmos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

.why-cosmos-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    position: relative;
    z-index: 2;
    text-align: center;
}

.why-cosmos-content > p.home-hero-description {
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-8);
}

.why-cosmos-title {
    font-size: var(--font-size-4xl);
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin-bottom: var(--spacing-12);
}

.why-cosmos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-6);
}

.why-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-4);
    padding: var(--spacing-6);
    background: rgba(18, 18, 18, 0.75);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.why-item-icon {
    color: #ffffff;
    font-size: 1.5rem;
    margin-top: var(--spacing-1);
    flex-shrink: 0;
}

.why-item-text {
    color: #ffffff;
    font-size: var(--font-size-base);
    line-height: 1.6;
}

/* CTA Section - Add background image */
main .cta {
    background-image: url('../../Photos/indexBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    min-height: 300px; /* Ensure section has height */
}

/* Dark overlay on CTA background for text readability */
main .cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

/* Smooth fade-to-black at bottom of CTA, blending into footer */
main .cta::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.2) 25%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.85) 75%,
        rgba(0, 0, 0, 1) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Ensure CTA content is above background image and gradient */
main .cta .container,
main .cta-content {
    position: relative;
    z-index: 2;
}


