/*
Design Concept: Modern Grid-Based Asymmetrical Layout
This design uses a contemporary approach with:
- Asymmetrical grid systems for visual interest
- Contemporary colour gradients and modern typography
- Card-based components with subtle depth
- Mobile-first responsive design principles
- Clean, studio-aesthetic styling perfect for app design showcase
*/

:root {
    --primary-color: #f59e0b;
    --primary-dark: #d97706;
    --secondary-color: #8b5cf6;
    --accent-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --background-card: #ffffff;
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --success-color: #10b981;
    --error-color: #ef4444;
    --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);
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --max-width: 1200px;
    --max-width-narrow: 800px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container and Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary {
    background-color: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--text-primary);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-md);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: var(--spacing-md);
}

.cookie-text h3 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.125rem;
}

.cookie-text p {
    margin: 0;
    font-size: 0.875rem;
}

.cookie-actions {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-shrink: 0;
}

.cookie-toggle {
    background: var(--text-light);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: white;
    transition: background-color 0.2s ease;
}

.cookie-toggle:hover {
    background: var(--text-secondary);
}

.cookie-details {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.cookie-category {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xs);
    cursor: pointer;
}

.cookie-category input[type="checkbox"] {
    margin-top: 2px;
}

.cookie-category span {
    font-weight: 500;
    display: block;
}

.cookie-category small {
    display: block;
    color: var(--text-light);
    font-size: 0.75rem;
    margin-top: 2px;
}

.cookie-save-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.cookie-minimized {
    position: fixed;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1000;
}

.cookie-minimized button {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease;
}

.cookie-minimized button:hover {
    transform: scale(1.1);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

.nav-brand h1 {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links a {
    font-weight: 500;
    padding: var(--spacing-xs) 0;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: 0.3s;
}

/* Main Content */
main {
    padding-top: 80px;
}

/* Hero Section */
.hero {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%236366f1" fill-opacity="0.03"><circle cx="30" cy="30" r="2"/></g></g></svg>') repeat;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-text h2 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

/* Section Styles */
section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    max-width: var(--max-width-narrow);
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Services Section */
.services {
    background-color: var(--background-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--background-card);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.service-icon svg {
    width: 32px;
    height: 32px;
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: var(--spacing-lg);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    margin-bottom: var(--spacing-xs);
}

.portfolio-overlay p {
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.9);
}

.portfolio-link {
    color: white;
    font-weight: 500;
    text-decoration: underline;
}

/* About Section */
.about {
    background-color: var(--background-alt);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.about-text h2 {
    margin-bottom: var(--spacing-md);
}

.about-text p {
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.stat p {
    color: var(--text-secondary);
    font-weight: 500;
}

.about-visual img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Process Section */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto var(--spacing-md);
}

.process-step h3 {
    margin-bottom: var(--spacing-sm);
}

/* Contact Section */
.contact {
    background-color: var(--background-alt);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

.contact-info h2 {
    margin-bottom: var(--spacing-md);
}

.contact-info p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item h4 {
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

/* Form Styles */
.contact-form {
    background: var(--background-card);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--text-primary), #374151);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
}

.footer-info h3 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
}

.footer-contact p {
    margin-bottom: var(--spacing-xs);
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.footer-section h4 {
    margin-bottom: var(--spacing-sm);
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

/* Space Section (for index_space.html) */
#space {
    min-height: 60vh;
    background: var(--background-alt);
    border: 2px dashed var(--border-medium);
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-2xl) auto;
    max-width: var(--max-width);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-text h2 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .cookie-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container,
    .hero-content {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --background: #ffffff;
        --background-alt: #f5f5f5;
        --border-light: #000000;
        --primary-color: #0000ff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .cookie-banner,
    .cookie-minimized {
        display: none !important;
    }
    
    main {
        padding-top: 0;
    }
    
    .hero {
        background: none;
    }
    
    .hero::before {
        display: none;
    }
}
