/* CSS Variables for unifying the theme */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #e0e7ff;
    --secondary-hover: #c7d2fe;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --surface-color: #ffffff;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

body {
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn) {
    font-weight: 600;
    color: var(--text-color);
}

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

/* Hero Section */
.hero {
    position: relative;
    padding: 10rem 1.5rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    min-height: 90vh;
}

.hero-content {
    max-width: 700px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--bg-dark), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInDown 0.8s ease backwards;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* Abstract Hero Background Graphics */
.hero-graphics {
    position: absolute;
    right: 0;
    top: 20%;
    width: 50%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 8s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -50px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #a855f7;
    bottom: 20%;
    right: 10%;
    animation-delay: -2s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #3b82f6;
    top: 40%;
    left: -50px;
    animation-delay: -4s;
}

/* Services */
.services {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--bg-dark);
}

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

.card {
    padding: 2.5rem;
    background: var(--surface-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

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

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

/* Contact Section */
.contact {
    padding: 8rem 0;
    background: linear-gradient(to bottom right, var(--bg-dark), #1e293b);
    color: white;
}

.contact-container {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: #94a3b8;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.direct-contact p {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.direct-contact a {
    color: var(--primary-color);
    font-weight: 600;
}

.direct-contact a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.contact-form-wrapper {
    flex: 1;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    color: var(--text-color);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

#math-challenge {
    font-weight: bold;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--surface-color);
    padding: 3rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    color: var(--text-muted);
}

.footer-logo {
    height: 40px;
    filter: grayscale(1) opacity(0.7);
    transition: filter var(--transition-fast);
}

.footer-logo:hover {
    filter: grayscale(0) opacity(1);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(20px) scale(1.05); }
}

/* Responsive */
@media (max-width: 992px) {
    .contact-container {
        flex-direction: column;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 8rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-graphics {
        display: none; /* Simplify on mobile */
    }
}
