
html {
    scroll-behavior: smooth;
    overflow-y: auto;
    height: 100%;
    background-color: rgba(12, 5, 27, 1);
}

body {
    min-height: 100%;
    overflow-y: auto;
    position: relative;
    background-color: #fff;
}

/* Inline critical CSS */
.index-hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
    min-height: 600px;
    contain: layout style paint;
}
@media (min-width: 768px) {
    .index-hero-container {
        flex-direction: row;
        justify-content: space-between;
    }
}
.index-hero-image {
    max-width: 100%;
    height: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    will-change: transform, opacity;
}
.index-hero-image.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Prevent layout shifts during font load */
.index-hero-text {
    font-size: 50px;
    line-height: 56px;
    font-weight: 800;
    margin-bottom: 0;
    align-self: flex-start;
    text-align: left;
    font-family: "Inter";
    letter-spacing: -1px;
    contain: layout style paint;
}

/* Reserve space for images */
.index-hero-image-container {
    min-height: 400px;
    width: 570px;
    max-width: 100%;
    contain: layout style paint;
}

/* Pre-define aspect ratios to prevent layout shifts */
.video-wrapper,
.video-placeholder,
iframe {
    aspect-ratio: 16/9;
    contain: layout style paint;
}

/* Pre-define image dimensions */
.index-hero-image,
.index-second-container-image,
.index-fourth-container-image {
    contain: layout style paint;
}

/* Tooltip styles for hero subtext */
.tooltip-word {
    position: relative;
    cursor: help;
    border-bottom: 2px dotted var(--color-primary, #3B82F6);
    transition: all 0.2s ease;
    color: var(--color-primary, #3B82F6);
}

.tooltip-word:hover {
    border-bottom-style: solid;
    filter: brightness(1.1);
}

/* Custom tooltip theme for hero words */
.tippy-box[data-theme~='hero-tooltip'] {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #f8fafc;
    border: 1px solid #475569;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    line-height: 1.4;
}

.tippy-box[data-theme~='hero-tooltip'] .tippy-content {
    padding: 12px 16px;
    font-weight: 500;
}

.tippy-box[data-theme~='hero-tooltip'][data-placement^='top'] > .tippy-arrow::before {
    border-top-color: #334155;
}

.tippy-box[data-theme~='hero-tooltip'][data-placement^='bottom'] > .tippy-arrow::before {
    border-bottom-color: #334155;
}

.tippy-box[data-theme~='hero-tooltip'][data-placement^='left'] > .tippy-arrow::before {
    border-left-color: #334155;
}

.tippy-box[data-theme~='hero-tooltip'][data-placement^='right'] > .tippy-arrow::before {
    border-right-color: #334155;
}
