:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #0ea5e9;
    --accent-purple: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    --gradient-text: linear-gradient(to right, #38bdf8, #818cf8);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 4rem auto;
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--surface-border);
}

.btn-secondary:hover {
    background: var(--surface-color);
    border-color: var(--text-secondary);
}

/* Glassmorphism */
.glass {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brein { color: var(--text-primary); }
.baas { color: var(--accent-blue); }

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

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

.lang-selector {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: none;
    border: 1px solid transparent;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    transition: var(--transition);
    opacity: 0.5;
    filter: grayscale(100%);
}

.lang-btn:hover {
    opacity: 0.8;
}

.lang-btn.active {
    opacity: 1;
    filter: grayscale(0%);
    border-color: var(--surface-border);
    background: var(--surface-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Waves Animation */
.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    min-height: 100px;
    max-height: 150px;
}

.waves {
    width: 100%;
    height: 100%;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; fill: var(--bg-color); }

@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

/* Expertise Section */
.expertise-section {
    padding: 8rem 0;
    position: relative;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.expertise-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.expertise-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

.expertise-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.expertise-card p {
    color: var(--text-secondary);
}

/* Showcase Section */
.showcase-section {
    padding: 8rem 0;
    background: rgba(15, 23, 42, 0.5);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.showcase-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.showcase-item:hover {
    transform: scale(1.02);
}

/* Image Wrappers */
.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-wrapper:hover .showcase-img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    padding: 2rem 1.5rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.image-wrapper:hover .overlay {
    transform: translateY(0);
}

.overlay span {
    font-weight: 600;
    font-size: 1.2rem;
}

/* MacOS like Code Window */
.code-window {
    background: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #333;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
}

.code-header {
    background: #2d2d2d;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #111;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.filename {
    color: #888;
    font-size: 0.85rem;
    margin-left: 1rem;
    font-family: monospace;
}

.code-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #d4d4d4;
    background: #1e1e1e;
}

/* Syntax Highlighting Base */
.keyword { color: #569cd6; }
.function { color: #dcdcaa; }
.type { color: #4ec9b0; }
.string { color: #ce9178; }
.comment { color: #6a9955; font-style: italic; }

/* Products Section */
.products-section {
    padding: 8rem 0;
    position: relative;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.product-item {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(14, 165, 233, 0.4);
}

.product-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05); /* very subtle huge number */
    position: absolute;
    top: 10px;
    right: 20px;
    transition: var(--transition);
}

.product-item:hover .product-number {
    color: rgba(14, 165, 233, 0.15); /* accent color on hover */
    transform: scale(1.1);
}

.product-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    z-index: 1; /* keep text above the absolute number */
}

/* Apps Section */
.apps-section {
    padding: 8rem 0;
    position: relative;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.apps-item {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.apps-item:hover {
    transform: translateY(-5px);
    box-shadow: 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(69, 233, 14, 0.9);
}

.apps-item-not-ready {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.apps-item-not-ready:hover {
    transform: translateY(-5px);
    box-shadow: 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(233, 14, 14, 0.9);
}

.apps-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05); /* very subtle huge number */
    position: absolute;
    top: 10px;
    right: 20px;
    transition: var(--transition);
}

.apps-item:hover .product-number {
    color: rgba(14, 165, 233, 0.15); /* accent color on hover */
    transform: scale(1.1);
}

.apps-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    z-index: 1; /* keep text above the absolute number */
}

/* Contact Section */
.contact-section {
    padding: 8rem 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--surface-border);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--surface-border);
    padding: 2rem 0;
    background: rgba(15, 23, 42, 0.8);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-left: 1rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-blue);
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(50px) scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--text-primary);
    text-decoration: none;
}

.modal-icon {
    font-size: 4rem;
    color: #10b981; /* Success green */
    margin-bottom: 1.5rem;
}

.modal-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.close-modal-btn {
    width: 100%;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* In a real app, implement hamburger menu */
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }
    
    .showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}
