/* --- Design System Variables --- */
:root {
    --bg-color: #fbfbfd;
    --surface-color: rgba(251, 251, 253, 0.8);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #0066cc;
    --accent-hover: #0077ed;
    --border-color: rgba(0, 0, 0, 0.08);
    --card-bg: #ffffff;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', Consolas, monospace;
}

/* --- Dark Mode Support --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --surface-color: rgba(0, 0, 0, 0.8);
        --text-primary: #f5f5f7;
        --text-secondary: #86868b;
        --accent-color: #2997ff;
        --accent-hover: #4ba6ff;
        --border-color: rgba(255, 255, 255, 0.15);
        --card-bg: #1c1c1e;
        --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 { color: var(--text-primary); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: 3.5rem; letter-spacing: -0.04em; }
p { color: var(--text-secondary); margin-bottom: 1.5rem; }
code { font-family: var(--font-mono); background: var(--card-bg); padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.875em; border: 1px solid var(--border-color); }

/* --- Utilities --- */
.text-gradient {
    background: linear-gradient(90deg, #2997ff, #eb54df);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 2rem;
}

main { flex: 1; padding: 6rem 0; }

/* --- Navigation --- */
.site-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--surface-color);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
}

.nav-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.25rem; color: var(--text-primary); text-decoration: none; letter-spacing: -0.02em; }
.nav-brand img { height: 1.5rem; width: auto; display: block; }
.nav-links a {
    margin-left: 1.5rem; text-decoration: none; color: var(--text-secondary);
    font-size: 0.85rem; transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent-color); }

/* --- Components --- */
.hero { text-align: center; padding: 4rem 0; position: relative; z-index: 1; }
.hero::before {
    content: '';
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80vw; max-width: 800px; height: 400px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.08) 0%, rgba(235, 84, 223, 0.05) 40%, transparent 70%);
    z-index: -1;
    filter: blur(40px);
    pointer-events: none;
}

.hero p { font-size: 1.35rem; max-width: 640px; margin: 0 auto 2.5rem auto; font-weight: 400; letter-spacing: -0.015em; }

.dynamic-box {
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    margin-top: 3rem;
    box-shadow: var(--card-shadow);
}
.dynamic-box h3 { font-size: 1.2rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.dynamic-box p { margin-bottom: 0; font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-color); }

/* --- Grids & Cards --- */
.section-title { font-size: 2rem; margin-bottom: 2rem; letter-spacing: -0.02em; text-align: center; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}
.service-card {
    padding: 2.5rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: dark) {
    .service-card:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
}
.service-card h3 { font-size: 1.35rem; margin-bottom: 0.75rem; letter-spacing: -0.015em; }
.service-card p { font-size: 0.95rem; margin-bottom: 0; }
.service-graphic {
    width: 100%; height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

/* --- Forms --- */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; color: var(--text-primary); }
.form-control { 
    width: 100%; padding: 0.875rem 1rem; 
    background: var(--bg-color); color: var(--text-primary); 
    border: 1px solid var(--border-color); border-radius: 12px; 
    font-family: var(--font-sans); font-size: 1rem; 
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15); }
.btn {
    display: inline-block; padding: 0.875rem 1.5rem; background: var(--accent-color); color: #fff;
    border: none; border-radius: 12px; font-size: 1rem; font-weight: 600; font-family: var(--font-sans);
    cursor: pointer; transition: background 0.2s ease; width: 100%; text-align: center; text-decoration: none;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- Error Page Components --- */
.error-hero { padding-top: 10rem; }
.error-code { font-size: 6rem; margin-bottom: 0; line-height: 1; }
.error-title { font-size: 1.75rem; font-weight: 500; color: var(--text-primary); margin-bottom: 0.5rem; }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    main { padding: 3rem 0; }
    .container { padding: 0 1.5rem; }
    .hero { padding: 2rem 0; }
    .hero p { font-size: 1.15rem; margin-bottom: 1.5rem; }
    .dynamic-box { padding: 1.5rem; margin-top: 2rem; }
    .site-footer { padding: 2rem 0; }
    .error-hero { padding-top: 5rem; }
    .error-code { font-size: 4rem; }
    .error-title { font-size: 1.35rem; }
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border-color); padding: 3rem 0; text-align: center; font-size: 0.85rem; color: var(--text-secondary);
}