:root {
    --bg-color: #030303;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
}

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

body, html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Fixed 3D Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: auto;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: fixed;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.6;
}

/* Sections */
section {
    min-height: 100vh;
    padding: 120px 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    pointer-events: none; /* Let background interaction through */
}

section > * {
    pointer-events: auto; /* Enable clicks on content */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Typography & Content */
h1 {
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
}

#hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 600px;
    margin-bottom: 3rem;
    color: var(--text-muted);
}

.content p {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--text-muted);
    max-width: 900px;
    line-height: 1.4;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cta-button:hover {
    background: var(--text-main);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* Services Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
}

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

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

/* Contact Form */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 700px;
}

.input-group {
    display: flex;
    gap: 1.5rem;
}

input, textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

textarea {
    min-height: 180px;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--text-main);
}

button {
    padding: 1.2rem;
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s, transform 0.3s;
    align-self: flex-start;
    padding-left: 3rem;
    padding-right: 3rem;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* Stagger grid items */
.grid .card:nth-child(1) { transition-delay: 0.1s; }
.grid .card:nth-child(2) { transition-delay: 0.2s; }
.grid .card:nth-child(3) { transition-delay: 0.3s; }
.grid .card:nth-child(4) { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .input-group {
        flex-direction: column;
    }
    button {
        width: 100%;
        align-self: stretch;
    }
}