/* ===================================
   Orbital Apps Portfolio Styles
   =================================== */

/* CSS Variables */
:root {
    --color-primary: #14532d;
    --color-primary-light: #166534;
    --color-accent: #FF5252;
    --color-accent-hover: #ff3333;
    --color-background: #f7fafc;
    --color-surface: #ffffff;
    --color-text: #1a202c;
    --color-text-secondary: #4a5568;
    --color-text-muted: #718096;
    --color-border: #e2e8f0;
    --color-border-light: #edf2f7;
    
    /* App Theme Colors */
    --sidereal-primary: #8B1E3F;
    --sidereal-light: #A62B4E;
    --sidereal-bg: #FDF2F4;
    --sidereal-border: #F5D0D8;
    
    --palette-primary: #0EA5E9;
    --palette-light: #38BDF8;
    --palette-bg: #F0F9FF;
    --palette-border: #BAE6FD;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition: 0.2s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
    color: var(--color-accent);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.tagline {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: none;
}

@media (min-width: 768px) {
    .tagline {
        display: block;
    }
}

.nav {
    display: none;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 0.5rem 0;
    position: relative;
}

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

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

.nav-link.contact-link:hover {
    color: var(--color-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
    background: linear-gradient(
        90deg,
        #667eea,
        #764ba2,
        #f093fb,
        #f5576c,
        #4facfe,
        #00f2fe,
        #43e97b,
        #667eea
    );
    background-size: 300% 100%;
    animation: wave-gradient 16s ease-in-out infinite;
    color: white;
    padding: 4rem 0;
    text-align: center;
    transition: animation-duration 0.5s ease;
}

.hero:hover {
    animation: wave-gradient 5s ease-in-out infinite;
}

@keyframes wave-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

/* Class kept for semantic markup */
.hero-title-animated {
    color: white;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero {
        padding: 5rem 0;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.25rem;
    }
}

/* Main Content */
.main {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .main {
        padding: 4rem 0;
    }
}

/* Apps Grid */
.apps-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* App Card */
.app-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.coming-soon-card {
    border: 2px dashed var(--color-border);
    box-shadow: none;
}

.coming-soon-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-accent);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.375rem 0.75rem;
    border-radius: 0 var(--radius-xl) 0 var(--radius-md);
}

/* Sidereal Theme */
#sidereal {
    background: var(--sidereal-bg);
    border: 1px solid var(--sidereal-border);
}

#sidereal .app-title h2 {
    color: var(--sidereal-primary);
}

#sidereal .features-list h3,
#sidereal .screenshots h3 {
    color: var(--sidereal-primary);
}

#sidereal .feature-icon {
    color: var(--sidereal-primary);
}

#sidereal .legal-links {
    border-top-color: var(--sidereal-border);
}

#sidereal .legal-links a:hover {
    color: var(--sidereal-primary);
}

/* Palette Knife Theme */
#palette-knife {
    background: var(--palette-bg);
    border: 2px dashed var(--palette-border);
}

#palette-knife .coming-soon-badge {
    background: var(--palette-primary);
}

#palette-knife .app-title h2 {
    color: var(--palette-primary);
}

#palette-knife .features-list h3,
#palette-knife .screenshots h3 {
    color: var(--palette-primary);
}

#palette-knife .feature-icon {
    color: var(--palette-primary);
}

#palette-knife .legal-links {
    border-top-color: var(--palette-border);
}

/* App Header */
.app-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.app-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.app-icon svg {
    width: 100%;
    height: 100%;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.125rem;
}

.app-tagline {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.35;
}

/* App Description */
.app-description {
    margin-bottom: 1.25rem;
}

.app-description p {
    font-size: 0.9375rem;
}

.app-description p {
    color: var(--color-text-secondary);
}

/* Features List */
.features-list {
    margin-bottom: 1.5rem;
}

.features-list h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.features-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.feature-icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    line-height: 1.3;
    color: var(--color-primary);
}

.features-list strong {
    color: var(--color-text);
}

/* Screenshots */
.screenshots {
    margin-bottom: 1.5rem;
}

.screenshots h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .screenshot-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.5rem;
    }
}

@media (min-width: 1024px) {
    .screenshot-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}

.screenshot-grid img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.screenshot-grid img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* Screenshot Placeholder */
.placeholder-screenshots .screenshot-placeholder {
    background: var(--color-background);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Store Buttons */
.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-text);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: background var(--transition), opacity var(--transition);
}

.store-btn:hover {
    background: var(--color-primary);
    color: white;
}

.store-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.store-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.store-btn span {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.store-btn small {
    font-size: 0.6875rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Store Badge Images */
.store-badge {
    display: inline-flex;
    align-items: center;
    transition: opacity var(--transition);
}

.store-badge img {
    height: 40px;
    width: auto;
}

.store-badge img[alt*="Google Play"] {
    height: 60px;
    margin: -10px -12px;
}

.store-badge.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.store-badge:hover:not(.disabled) {
    opacity: 0.85;
}

/* Legal Links */
.legal-links {
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-light);
    font-size: 0.8125rem;
}

.legal-links a {
    color: var(--color-text-muted);
}

.legal-links a:hover {
    color: var(--color-primary);
}

.legal-links .separator {
    margin: 0 0.5rem;
    color: var(--color-border);
}

.legal-links .coming-soon-text {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-logo .logo-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-contact a:hover {
    color: white;
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .header,
    .store-buttons,
    .footer {
        display: none;
    }
    
    .app-card {
        box-shadow: none;
        border: 1px solid var(--color-border);
        break-inside: avoid;
    }
}
