/* 
 * mAIa Corporate Website Styles
 * Dark Mode Tech Aesthetics
 */

/* --- 1. CSS Custom Properties --- */
:root {
    /* Colors */
    --bg-color: #050507;
    --surface-color: rgba(15, 16, 22, 0.8);
    --surface-color-solid: #0f1016;
    --primary-accent: #00f2ff; /* Cyber Cyan */
    --secondary-accent: #7000ff; /* Neural Purple */
    --text-primary: #f0f2f5;
    --text-muted: #a0aec0; /* Increased contrast from #8b9bb4 */
    
    /* Glassmorphism */
    --glass-bg: rgba(15, 16, 22, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Typography */
    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-max-width: 1200px;
    --section-padding: 80px 20px;
    --transition-speed: 0.3s;
}

/* --- 2. Font Face Placeholders --- */
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* --- 3. Base Styles & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Noise Filter Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-headline);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

/* --- 4. Reusable Components --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
}

.cta-button {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
    font-family: var(--font-headline);
    font-weight: 500;
    border-radius: 4px;
    transition: all var(--transition-speed);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.cta-button:hover {
    background: var(--primary-accent);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

.cta-button:focus-visible,
.legal-link:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 4px;
}

/* --- 5. Header & Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: 1000;
    padding: 0;
    background: linear-gradient(to bottom, rgba(5, 5, 7, 0.8), transparent);
    overflow: hidden;
}

.nav-container {
    max-width: var(--container-max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-accent);
    letter-spacing: 2px;
}

.logo img {
    height: 130px;
    width: auto;
    display: block;
}

/* --- 6. Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh; /* Better for content overflow */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-claim {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subclaim {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* --- 7. Services Section --- */
.services {
    padding: var(--section-padding);
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--primary-accent);
    margin: 15px auto 0;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.service-card {
    padding: 40px;
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-accent);
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.15);
}

.service-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-accent);
    margin-bottom: 10px;
}

.service-card h3 {
    font-size: 1.5rem;
    color: #fff;
}

.service-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- 8. Footer --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.legal-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 10px;
    font-family: var(--font-body);
    text-decoration: underline;
    transition: color var(--transition-speed);
}

.legal-link:hover {
    color: var(--primary-accent);
}

/* --- 9. Legal Modal --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(5, 5, 7, 0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 10px; /* Larger hit area */
}

.close-button:focus-visible {
    outline: 2px solid var(--primary-accent);
}

.modal-body h1, .modal-body h2, .modal-body h3 {
    margin: 20px 0 10px;
    color: var(--primary-accent);
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.modal-body a {
    color: var(--primary-accent);
    text-decoration: underline;
}

/* --- 10. Responsive Design (Media Queries) --- */

/* Tablet */
@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-padding {
        padding: 120px 20px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-claim {
        max-width: 900px;
    }
}

/* AOS Placeholder (if not using library, we can add simple fade-in) */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}
