/* Main CSS - Eco-Futurism v3 */

@import 'variables.css';

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    /* Tight modern spacing */
}

h1 {
    font-size: var(--font-size-h1);
    color: var(--color-primary-end);
}

h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-muted);
}

/* --- Layout Utilities --- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

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

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

/* --- Glassmorphism Components --- */
.glass-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    padding: var(--spacing-md);
    transition: var(--transition-smooth);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

/* --- Interactive Elements --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
    color: white;
    box-shadow: 0 10px 20px -5px rgba(24, 139, 151, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary-end), var(--color-primary-start));
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(24, 139, 151, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.hover-tilt {
    /* JS will handle transform, but we set perspective here */
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

/* --- Micro-Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Specific Components --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Nav height */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.9);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.2) 100%);
    z-index: -1;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary-end);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.footer {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

@media (max-width: 768px) {
    :root {
        --font-size-h1: 3rem;
    }

    .nav-links {
        display: none;
        /* simple hide for now, JS will enable mobile menu */
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}