/* ========================================
   QueryCraft AI - Liquid Glass Design System
   Based on Aether Design Philosophy
   ======================================== */

/* === CSS Variables === */
:root {
    /* Colors */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-secondary: #8b5cf6;
    --color-accent: #ec4899;
    --color-success: #10b981;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-blur: blur(16px);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius - Only 2 values as per Aether philosophy */
    --radius-large: 1.5rem; /* rounded-2xl for containers */
    --radius-full: 9999px;  /* rounded-full for circular elements */
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Transitions - Physics-based cubic-bezier */
    --transition-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* === Glass Card Components === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--transition-smooth);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transform: translateY(-4px);
}

.glass-card-large {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    box-shadow: 0 16px 64px 0 rgba(31, 38, 135, 0.2);
    padding: var(--spacing-2xl);
}

/* === Navigation === */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 12, 41, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s var(--transition-smooth);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.logo svg {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s var(--transition-smooth);
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

/* === Buttons === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-large);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s var(--transition-smooth);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-large);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: var(--radius-full);
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 50%;
    right: -150px;
    animation-delay: 7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    bottom: -100px;
    left: 50%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
    animation: slideDown 0.6s var(--transition-smooth);
}

.badge-icon {
    font-size: 1.1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    animation: slideUp 0.8s var(--transition-smooth) 0.2s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
    animation: slideUp 0.8s var(--transition-smooth) 0.4s both;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-2xl);
    animation: slideUp 0.8s var(--transition-smooth) 0.6s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    max-width: 700px;
    margin: 0 auto;
    animation: slideUp 0.8s var(--transition-smooth) 0.8s both;
}

.stat-item {
    padding: var(--spacing-md);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* === Features Section === */
.features {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    padding: var(--spacing-xl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-large);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    color: #ffffff;
}

.gradient-bg-1 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s var(--transition-smooth);
}

.tag:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* === How It Works Section === */
.how-it-works {
    padding: var(--spacing-2xl) 0;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    padding: var(--spacing-xl);
    position: relative;
}

.step-number {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.step-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.step-description {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.step-visual {
    margin-top: var(--spacing-md);
}

.code-block {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-large);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.3);
}

.code-lang {
    margin-left: auto;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-weight: 600;
}

.code-content {
    padding: var(--spacing-md);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.text-prompt {
    color: rgba(255, 255, 255, 0.9);
}

code {
    display: block;
    color: rgba(255, 255, 255, 0.85);
}

.keyword {
    color: #8b5cf6;
    font-weight: 600;
}

.number {
    color: #10b981;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chart-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-large);
    padding: var(--spacing-md);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 120px;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.bar {
    flex: 1;
    background: var(--gradient-primary);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    transition: all 0.3s var(--transition-smooth);
    animation: barGrow 0.8s var(--transition-bounce);
}

@keyframes barGrow {
    from {
        height: 0;
    }
}

.bar:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

.chart-insight {
    padding: var(--spacing-sm);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-large);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* === Use Cases Section === */
.use-cases {
    padding: var(--spacing-2xl) 0;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.use-case-card {
    padding: var(--spacing-xl);
    text-align: center;
}

.use-case-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.use-case-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.use-case-description {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
}

/* === CTA Section === */
.cta {
    padding: var(--spacing-2xl) 0;
}

.cta-content {
    text-align: center;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.cta-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xl);
}

.cta-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xl);
}

.cta-features {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.cta-feature svg {
    color: var(--color-success);
}

/* === Footer === */
.footer {
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand {
    max-width: 400px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--spacing-sm);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-bottom: var(--spacing-xs);
    transition: color 0.3s var(--transition-smooth);
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-md);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s var(--transition-smooth);
}

.footer-legal a:hover {
    color: #ffffff;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: var(--spacing-md) 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: var(--spacing-md);
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .hero {
        padding-top: 5rem;
        min-height: auto;
        padding-bottom: var(--spacing-2xl);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .glass-card-large {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .nav-links a:not(.btn-primary) {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features-grid,
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Print Styles === */
@media print {
    .glass-nav,
    .hero-background,
    .footer {
        display: none;
    }
}
