/* 
 * Frames for Pixel™ - Global Styles
 * Incorporates Material 3 Expressive aesthetics 
 */

:root {
    /* Material 3 Expressive Colors - Dark Mode */
    --md-sys-color-background: #0f141a;
    --md-sys-color-on-background: #e1e2e8;
    
    --md-sys-color-primary: #a8c7fa;
    --md-sys-color-on-primary: #062e6f;
    --md-sys-color-primary-container: #004a77; /* Accent background */
    --md-sys-color-on-primary-container: #d1e4ff;
    
    --md-sys-color-secondary: #ffb4a9;
    --md-sys-color-on-secondary: #690005;
    --md-sys-color-secondary-container: #93000a;
    --md-sys-color-on-secondary-container: #ffdad6;

    --md-sys-color-surface: #111318;
    --md-sys-color-surface-variant: #44474e;
    --md-sys-color-on-surface: #e1e2e8;
    --md-sys-color-outline: #8e9199;

    /* Gradients for UI Vibrancy */
    --gradient-primary: linear-gradient(135deg, #a8c7fa 0%, #ffb4a9 100%);
    --gradient-blob-1: linear-gradient(135deg, rgba(0, 74, 119, 0.7), rgba(168, 199, 250, 0.2));
    --gradient-blob-2: linear-gradient(135deg, rgba(147, 0, 10, 0.6), rgba(255, 180, 169, 0.1));
    --gradient-blob-3: linear-gradient(135deg, rgba(0, 100, 150, 0.5), rgba(0, 50, 100, 0.2));

    --glass-bg: rgba(17, 19, 24, 0.65);
    --glass-border: rgba(225, 226, 232, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-standard: 300ms cubic-bezier(0.2, 0, 0, 1);
    --transition-emphasized: 500ms cubic-bezier(0.2, 0, 0, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: var(--md-sys-color-primary);
    transition: color var(--transition-standard);
}

a:hover {
    color: var(--md-sys-color-on-primary-container);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

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

/* Utilities */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(40, 42, 54, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 32px;
}

/* Buttons & Badges */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-standard);
    border: none;
}

.btn-primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn-primary:hover {
    background-color: var(--md-sys-color-on-primary-container);
    color: var(--md-sys-color-primary-container);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 199, 250, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 2px solid var(--md-sys-color-outline);
}

.btn-secondary:hover {
    border-color: var(--md-sys-color-primary);
    background-color: rgba(168, 199, 250, 0.08);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.125rem;
}

.play-badge-link {
    display: inline-block;
    transition: transform var(--transition-standard);
}

.play-badge-link:hover {
    transform: translateY(-2px);
}

.play-badge-nav {
    height: 48px;
    width: auto;
    vertical-align: middle;
}

.play-badge-hero {
    height: 60px;
    width: auto;
    vertical-align: middle;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    border-top: none;
    border-left: none;
    border-right: none;
}

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

.logo {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-bold {
    font-weight: 800;
    font-style: italic;
    color: var(--md-sys-color-primary);
}

.logo-light {
    font-weight: 300;
    color: var(--md-sys-color-on-background);
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--md-sys-color-primary);
    transition: width var(--transition-standard);
}

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

/* Hero Section */
.hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.8;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--gradient-blob-1);
    top: -10%;
    right: -10%;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--gradient-blob-2);
    bottom: -20%;
    left: -10%;
    animation: drift 25s infinite alternate-reverse ease-in-out;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--gradient-blob-3);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 15s infinite alternate ease-in-out;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, 100px) scale(1.2); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); }
    100% { transform: translate(-50%, -50%) scale(1.3); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--md-sys-color-on-surface);
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 540px;
}

.badge {
    display: inline-block;
    background: rgba(168, 199, 250, 0.1);
    border: 1px solid rgba(168, 199, 250, 0.2);
    color: var(--md-sys-color-primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Uploaded App Screenshots Container */
.hero-visual {
    position: relative;
    height: 600px;
    perspective: 1000px;
}

.uploaded-images-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.fold-wrapper {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    height: 85%;
    width: 65%;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.phone-wrapper {
    position: absolute;
    bottom: 5%;
    left: 5%;
    height: 75%;
    width: 45%;
    z-index: 3;
    display: flex;
    align-items: flex-end;
}

.app-screenshot {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* Float Animations */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation-delayed {
    animation: float 7s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes float {
    0% { transform: translateY(0px) rotateX(2deg) rotateY(-2deg); }
    50% { transform: translateY(-15px) rotateX(1deg) rotateY(-1deg); }
    100% { transform: translateY(0px) rotateX(2deg) rotateY(-2deg); }
}


/* Features Section */
.features-section {
    padding: 120px 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: 2.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--md-sys-color-on-surface);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 64px auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    transition: transform var(--transition-standard), box-shadow var(--transition-standard), background var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(168, 199, 250, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity var(--transition-standard);
    z-index: 0;
}

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

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(168, 199, 250, 0.1);
    color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(168, 199, 250, 0.2);
}

.icon-batch::after { content: '🗂️'; }
.icon-export::after { content: '🚀'; }
.icon-smart::after { content: '✨'; }
.icon-m3::after { content: '🎨'; }
.icon-layouts::after { content: '📱'; }
.icon-pixel::after { content: 'G'; font-weight: bold; font-family: sans-serif; }

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-text {
    color: var(--md-sys-color-on-surface);
    opacity: 0.8;
    font-size: 0.95rem;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    background: rgba(45, 48, 62, 0.6);
}

/* Footer */
.footer {
    background: var(--md-sys-color-surface);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 64px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-tagline {
    color: var(--md-sys-color-on-surface);
    opacity: 0.7;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--md-sys-color-on-surface);
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--md-sys-color-primary);
}

.footer-bottom {
    text-align: center;
    color: var(--md-sys-color-on-surface);
    opacity: 0.5;
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards cubic-bezier(0.2, 0, 0, 1);
}

.slide-down {
    animation: slideDown 0.6s forwards cubic-bezier(0.2, 0, 0, 1);
}

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

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

/* Responsive Styling */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 40px auto;
    }
    
    .hero-actions {
        justify-content: center;
        margin-bottom: 64px;
    }
    
    .hero-visual {
        height: 500px;
    }
    
    .fold-wrapper {
        right: 50%;
        transform: translate(50%, -50%);
        justify-content: center;
        width: 80%;
    }
    
    .phone-wrapper {
        left: 50%;
        transform: translate(-100%, 0);
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 16px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .fold-wrapper {
        width: 100%;
        max-width: 400px;
        right: auto;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .phone-wrapper {
        display: none; /* Hide on small screens to avoid clutter */
    }
}
