/* ========================================================
   Artificial Aurora LLC — Main Stylesheet
   Optimized for performance and SEO
   ======================================================== */

/* ----- CSS Custom Properties / Design Tokens ----- */
:root {
    /* Colors */
    --color-bg: #0a0a1a;
    --color-bg-secondary: #0f0f2e;
    --color-bg-card: rgba(15, 15, 46, 0.6);
    --color-bg-card-hover: rgba(20, 20, 60, 0.8);
    --color-surface: rgba(255, 255, 255, 0.03);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(139, 92, 246, 0.3);

    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-heading: #f8fafc;

    --color-primary: #8b5cf6;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #7c3aed;
    --color-secondary: #06b6d4;
    --color-accent: #ec4899;

    --gradient-aurora: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #ec4899 100%);
    --gradient-aurora-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 50%, rgba(236, 72, 153, 0.1) 100%);
    --gradient-text: linear-gradient(135deg, #a78bfa, #06b6d4, #ec4899);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    --font-size-7xl: 4.5rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 72px;

    /* Effects */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-text-size-adjust: 100%;
}

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

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

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

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-heading);
    line-height: 1.2;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ----- Navbar ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(10, 10, 26, 0.95);
    box-shadow: var(--shadow-lg);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--color-text-heading);
    transition: opacity var(--transition-base);
}

.nav-logo:hover {
    opacity: 0.9;
}

.nav-logo img {
    border-radius: var(--radius-md);
}

.nav-brand {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.nav-toggle:hover {
    background: var(--color-surface);
}

.nav-toggle .close-icon {
    display: none;
}

.nav-toggle.active .menu-icon {
    display: none;
}

.nav-toggle.active .close-icon {
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-aurora);
    transition: width var(--transition-base);
    border-radius: var(--radius-full);
}

.nav-link:hover {
    color: var(--color-text-heading);
}

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

.nav-link.nav-cta {
    background: var(--gradient-aurora);
    color: white;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-link.nav-cta::after {
    display: none;
}

.nav-link.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* ----- Hero Section ----- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--nav-height) var(--space-6) var(--space-8);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.aurora-effect {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139, 92, 246, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 20% 50%, rgba(6, 182, 212, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 60%);
    animation: auroraShift 8s ease-in-out infinite alternate;
}

@keyframes auroraShift {
    0% {
        opacity: 0.7;
        transform: scale(1) translateY(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-10px);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.02) translateY(5px);
    }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.5) 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.5) 70%, transparent 100%);
}

.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--color-primary-light);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: var(--font-size-6xl);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-6);
}

.hero-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientMove 4s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto var(--space-10);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--gradient-aurora);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-light);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
}

.btn-lg svg {
    width: 20px;
    height: 20px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--color-text-muted);
    opacity: 0.5;
    z-index: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ----- Section Common ----- */
.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ----- Expertise Section ----- */
.expertise {
    padding: var(--space-24) 0;
    background: var(--color-bg);
    position: relative;
}

.expertise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.expertise-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.expertise-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.expertise-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-aurora-soft);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.expertise-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    background: var(--color-bg-card-hover);
}

.expertise-card:hover::before {
    opacity: 1;
}

.card-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: var(--space-6);
    color: var(--color-primary-light);
    transition: all var(--transition-base);
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

.expertise-card:hover .card-icon {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    transform: scale(1.1);
}

.expertise-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    position: relative;
}

.expertise-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.7;
    position: relative;
}

/* ----- About Section ----- */
.about {
    padding: var(--space-24) 0;
    background: var(--color-bg-secondary);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: var(--space-6);
}

.about-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.feature-item {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    padding: var(--space-6);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateX(30px);
}

.feature-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.feature-item:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-card-hover);
    transform: translateX(4px);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: var(--radius-lg);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--color-primary-light);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-text h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.feature-text p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ----- CTA Section ----- */
.cta {
    padding: var(--space-24) 0;
    position: relative;
    overflow: hidden;
    background: var(--color-bg);
}

.cta-bg {
    position: absolute;
    inset: 0;
}

.aurora-effect-cta {
    background:
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(139, 92, 246, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 30% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 70% 50%, rgba(236, 72, 153, 0.07) 0%, transparent 60%);
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.cta-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-10);
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ----- Footer ----- */
.footer {
    padding: var(--space-12) 0;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.footer-brand img {
    border-radius: var(--radius-md);
}

.footer-brand-text h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand-text p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.footer-tagline {
    font-size: var(--font-size-xs) !important;
    opacity: 0.7;
}

.footer-bottom {
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    width: 100%;
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ----- Responsive Design ----- */
@media (max-width: 1024px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: var(--font-size-5xl);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .about-text .section-title {
        text-align: center;
    }

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

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-6);
        gap: var(--space-4);
        border-bottom: 1px solid var(--color-border);
        animation: slideDown 0.3s ease;
    }

    .nav-links.open {
        display: flex;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-link {
        font-size: var(--font-size-base);
        padding: var(--space-2) 0;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .cta-title {
        font-size: var(--font-size-3xl);
    }

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

    .expertise,
    .about,
    .cta {
        padding: var(--space-16) 0;
    }

    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .nav-brand {
        font-size: var(--font-size-sm);
    }
}

/* ----- Utility / Animation Classes ----- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ----- Selection ----- */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* ----- Focus styles for accessibility ----- */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
