/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    background-color: var(--color-bg-main); /* Dark background */
}

html, body {
    background-color: #030304 !important; /* Hardcoded dark background - always visible */
    color: #f5f5f7 !important; /* Hardcoded text color - always visible */
}

body {
    font-family: var(--font-family-sans);
    background-color: var(--color-bg-main) !important; /* Fallback background color - always visible */
    color: #f5f5f7 !important; /* Fallback text color - always visible */
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    opacity: 1 !important; /* Always visible - no fade-in to prevent black screen */
    transition: opacity 0.5s ease-in-out; /* Smooth page load */
    min-height: 100vh; /* Ensure full height */
}

body.loaded {
    opacity: 1 !important;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.05;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

p {
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px; /* Wider standard */
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.flex {
    display: flex;
    gap: var(--spacing-md);
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

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

/* Utility Classes */
.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
