/* 
 * Modern Asymmetric Glassmorphism Design for Mobile App & Product Design Studio
 * Design Concept: Diagonal grid system with frosted glass elements, bold typography hierarchy,
 * and interactive micro-animations to showcase digital design expertise
 */

/* Base Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --shadow-soft: 0 8px 32px rgba(15, 23, 42, 0.4);
    --shadow-strong: 0 15px 35px rgba(15, 23, 42, 0.8);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.glass-button {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 24px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--text-primary);
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Layout System */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section:nth-child(even) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 15, 35, 0.9);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Hero Section - Asymmetric Layout */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: center;
    gap: 4rem;
    padding: 8rem 0 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.1;
    clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: -1;
}

.hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    max-width: 600px;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.hero-graphic {
    width: 100%;
    max-width: 500px;
    height: 400px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-graphic::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, var(--primary-gradient), var(--secondary-gradient), var(--accent-gradient));
    opacity: 0.1;
    animation: rotate 20s linear infinite;
}

/* Hero Mockup Styles */
.hero-mockup {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 35px;
    padding: 8px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border-radius: 28px;
    padding: 20px 16px;
    overflow: hidden;
    position: relative;
}

.screen-header {
    margin-bottom: 24px;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.signal-bars {
    width: 18px;
    height: 12px;
    background: linear-gradient(90deg, var(--primary-gradient));
    border-radius: 2px;
    position: relative;
}

.signal-bars::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 2px;
    width: 14px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.signal-bars::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 4px;
    width: 10px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.battery {
    width: 24px;
    height: 12px;
    border: 2px solid var(--text-primary);
    border-radius: 2px;
    position: relative;
}

.battery::before {
    content: '';
    position: absolute;
    right: -4px;
    top: 2px;
    width: 2px;
    height: 4px;
    background: var(--text-primary);
    border-radius: 0 1px 1px 0;
}

.battery::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 1px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.app-icon {
    font-size: 24px;
}

.app-header span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

.screen-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.12);
}

.card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 10px;
}

.feature-card h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    font-size: 32px;
    animation: float 4s ease-in-out infinite;
    opacity: 0.8;
}

.floating-icon.icon-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
    color: #10b981;
}

.floating-icon.icon-2 {
    top: 25%;
    right: 15%;
    animation-delay: -1.5s;
    color: #06b6d4;
}

.floating-icon.icon-3 {
    bottom: 20%;
    left: 15%;
    animation-delay: -3s;
    color: #3b82f6;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.cta-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

/* Services Section - Diagonal Grid */
.services {
    padding: 8rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Portfolio Preview */
.portfolio {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    aspect-ratio: 4/3;
    background: var(--glass-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-strong);
}

.portfolio-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(15, 15, 35, 0.9));
}

/* Contact Form */
.contact {
    padding: 8rem 0;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
}

.form-group {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
}

.form-control:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    text-align: center;
}

.policy-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.policy-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.policy-links a:hover {
    color: var(--text-primary);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 500px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-strong);
    z-index: 10000;
    transition: all 0.3s ease;
}

.cookie-banner.minimized {
    padding: 1rem;
    cursor: pointer;
}

.cookie-banner.minimized .cookie-content,
.cookie-banner.minimized .cookie-actions {
    display: none;
}

.cookie-banner.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.cookie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.cookie-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cookie-toggle:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.cookie-content {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: var(--primary-gradient);
    color: white;
}

.cookie-btn.decline {
    background: var(--glass-bg);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.cookie-btn.customize {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

/* Space Section (for index_space.html) */
#space {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

#space::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from 45deg, var(--primary-gradient), transparent, var(--secondary-gradient));
    opacity: 0.1;
    animation: rotate 30s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding: 6rem 0 3rem;
        justify-items: center;
    }
    
    .hero-content {
        align-items: center;
        text-align: center;
        max-width: 500px;
    }
    
    .hero-content .cta-group {
        justify-content: center;
    }
    
    .hero-visual {
        min-height: 500px;
    }
    
    .hero::before {
        width: 100%;
        clip-path: polygon(0% 0%, 100% 0%, 100% 30%, 0% 60%);
    }
    
    .phone-mockup {
        width: 240px;
        height: 480px;
    }
    
    .floating-icon {
        font-size: 24px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .policy-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        gap: 2rem;
        padding: 5rem 0 2rem;
    }
    
    .hero-content {
        max-width: 400px;
    }
    
    .hero-visual {
        min-height: 450px;
    }
    
    .cta-group {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    
    .cta-group .btn-primary,
    .cta-group .glass-button {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
    
    .phone-screen {
        padding: 16px 12px;
    }
    
    .floating-icon {
        font-size: 20px;
    }
    
    .feature-card {
        padding: 12px;
        gap: 12px;
    }
    
    .card-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

.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;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid rgba(16, 185, 129, 0.7);
    outline-offset: 2px;
}

/* Form validation styles */
.form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Header scroll effect */
.header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
}